zfs/contrib
наб f9a2d94c95 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>
Backport-of: 5ece420f03
Closes #12820
2023-06-17 19:52:46 -07:00
..
bash_completion.d contrib/bash_completion.d: fix error spew from __zfs_match_snapshot() 2023-06-17 19:52:46 -07:00
bpftrace Remove basename(1). Clean up/shorten some coreutils pipelines 2022-02-16 17:58:55 -08:00
dracut contrib: dracut: fix race with root=zfs:dset when necessities required 2023-04-18 10:10:45 -07:00
initramfs Revert "initramfs: use `mount.zfs` instead of `mount`" 2023-06-01 08:30:54 -07:00
intel_qat Add intel_QAT patches 2020-09-30 13:17:30 -07:00
pam_zfs_key pam: Fix "buffer overflow" in pam ZTS tests on F38 2023-05-11 09:07:34 -07:00
pyzfs Removed Python 2 and Python 3.5- support 2023-04-13 15:59:45 -07:00
zcp Fix contrib/zcp/Makefile.am 2019-10-30 12:37:49 -07:00
Makefile.am Turn shellcheck into a normal make target. Fix new files it caught 2021-06-09 13:05:34 -07:00