zfs/contrib
наб 5ece420f03
contrib/bash_completion.d: fix error spew from __zfs_match_snapshot()
Given:
  /sbin/zfs list filling/a-zvol<TAB> -o space,refratio
The rest of the cmdline gets vored by:
  /sbin/zfs list filling/a-zvolcannot open 'filling/a-zvol':
  operation not applicable to datasets of this type

With -x (fragment):
  + COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur"))
  +++ __zfs_match_snapshot
  +++ local base_dataset=filling/dziadtop-nowe-duchy
  +++ [[ filling/dziadtop-nowe-duchy != filling/dziadtop-nowe-duchy ]]
  +++ [[ filling/dziadtop-nowe-duchy != '' ]]
  +++ __zfs_list_datasets filling/dziadtop-nowe-duchy
  +++ /sbin/zfs list -H -o name -s name -t filesystem
                     -r filling/dziadtop-nowe-duchy
  +++ tail -n +2
  cannot open 'filling/dziadtop-nowe-duchy':
  operation not applicable to datasets of this type
  +++ echo filling/dziadtop-nowe-duchy
  +++ echo filling/dziadtop-nowe-duchy@
  ++ compgen -W 'filling/dziadtop-nowe-duchy

This properly completes with:
  $ /sbin/zfs list filling/a-zvol<TAB> -o space,refratio
  filling/a-zvol   filling/a-zvol@
  $ /sbin/zfs list filling/a-zvol<cursor> -o space,refratio

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12820
2021-12-07 12:30:10 -08:00
..
bash_completion.d contrib/bash_completion.d: fix error spew from __zfs_match_snapshot() 2021-12-07 12:30:10 -08:00
bpftrace Pass `--enable=all` to shellcheck within contrib/ 2021-11-30 10:23:10 -08:00
dracut Pass `--enable=all` to shellcheck within contrib/ 2021-11-30 10:23:10 -08:00
initramfs Pass `--enable=all` to shellcheck within contrib/ 2021-11-30 10:23:10 -08:00
intel_qat Add intel_QAT patches 2020-09-30 13:17:30 -07:00
pam_zfs_key pam_zfs_key: malloc and mlock/munlock won't match 2021-10-22 11:42:34 -07:00
pyzfs Add `const` to nvlist functions to properly expose their real behavior 2021-12-06 18:19:13 -07:00
zcp Fix contrib/zcp/Makefile.am 2019-10-30 12:37:49 -07:00
Makefile.am Pass `--enable=all` to shellcheck within contrib/ 2021-11-30 10:23:10 -08:00