cut completions: fix for BSD/macOS

Sharpened the pencil on a few description strings as well.
This commit is contained in:
Aaron Gyes 2022-01-31 22:28:13 -08:00
parent d40f805d94
commit 1d9f34e8bf

View file

@ -1,11 +1,21 @@
complete -c cut -s b -l bytes -x -d "Output byte range"
complete -c cut -s c -l characters -x -d "Output character range"
complete -c cut -s d -l delimiter -x -d "Select field delimiter"
complete -c cut -s f -l fields -x -d "Select fields"
complete -c cut -s n -d "Don't split multi byte characters"
complete -c cut -l complement -d "complement the set of selected bytes, characters or fields"
complete -c cut -s s -l only-delimited -d "Do not print lines without delimiter"
complete -c cut -l output-delimiter -x -d "Select output delimiter"
complete -c cut -s z -l zero-terminated -d "line delimiter is NUL, not newline"
complete -c cut -l help -d "Display help and exit"
complete -c cut -l version -d "Display version and exit"
if cut --version &>/dev/null
complete -c cut -s b -l bytes -x -d "Select byte positions"
complete -c cut -s c -l characters -x -d "Select characters"
complete -c cut -s d -l delimiter -x -d "Select field delimiter"
complete -c cut -s f -l fields -x -d "Select fields"
complete -c cut -s n -d "Don't split multi-byte characters"
complete -c cut -l complement -d "complement the set of selected bytes, characters or fields"
complete -c cut -s s -l only-delimited -d "Suppress lines without delimiter"
complete -c cut -l output-delimiter -x -d "Select output delimiter"
complete -c cut -s z -l zero-terminated -d "line delimiter is NUL, not newline"
complete -c cut -l help -d "Display help and exit"
complete -c cut -l version -d "Display version and exit"
else
complete -c cut -s b -x -d "Select byte positions"
complete -c cut -s c -x -d "Output character range"
complete -c cut -s d -x -d "Delimiter instead of \t to use"
complete -c cut -s f -x -d "Select fields"
complete -c cut -s n -d "Don't split multi-byte characters"
complete -c cut -s s -d "Supress lines without delimiter"
complete -c cut -s w -d "Use whitespace as delimiter"
end