From 16d5d6a9dae526355caf16f2de9d57d84b5d9993 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 24 Nov 2021 23:07:18 +0100 Subject: 49597: add a helper for completing numbers with unit suffixes and separate out defaults, ranges and units in completion descriptions --- Completion/Linux/Command/_btrfs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Completion/Linux') diff --git a/Completion/Linux/Command/_btrfs b/Completion/Linux/Command/_btrfs index bb0f724e6..65cf067aa 100644 --- a/Completion/Linux/Command/_btrfs +++ b/Completion/Linux/Command/_btrfs @@ -147,16 +147,16 @@ while (( $#state )); do '--tbytes[show sizes in TiB, or TB with --si]' ) ;| - filesystem:resize) args+=( '1:size:_guard "(|+|-)[0-9]#[GKM]"' '2:path:->mounts' );; + filesystem:resize) args+=( '1: :_numbers -u bytes -N size K M G T P E' '2:path:->mounts' );; filesystem:defragment) args+=( '!-v' '-r[defragment files recursively]' '-c+[compress files while defragmenting]::compression algorithm:(zlib lzo zstd)' '-r[defragment files recursively]' '-f[flush after defragmenting]' - '-s[start position]:byte position' - '-l[defragment limited number of bytes]:length (bytes)' - '-t[defragment only files over a certain size]:minimum size (bytes) [32M]' + '-s[start position]: :_numbers -u bytes -d "beginning of file" offset K M G T P E' + '-l[defragment limited number of bytes]: :_numbers -u bytes length K M G T P E' + '-t[defragment only extents up to a certain size]: :_numbers -u bytes -d 32M "maximum extent size" K M G T P E' '*:file:_files' ) ;; -- cgit 1.4.1