chgrp, chmod completions: pipe both stderr and stdout to /dev/null

Seems like --version output writes to stdout on the GNU utils.
This commit is contained in:
Aaron Gyes 2022-01-31 21:27:12 -08:00
parent d059c3b5b2
commit 56a4920856
2 changed files with 2 additions and 8 deletions

View File

@ -1,4 +1,4 @@
if chgrp --version 2>/dev/null # not unix
if chgrp --version &>/dev/null # not unix
complete -c chgrp -s c -l changes -d "Output diagnostic for changed files"
complete -c chgrp -l dereference -d "Dereference symlinks"
complete -c chgrp -s h -l no-dereference -d "Don't dereference symlinks"

View File

@ -1,10 +1,4 @@
#
# Command specific completions for the chmod command.
# These completions where generated from the commands
# man page by the make_completions.py script, but may
# have been hand edited since.
#
if chmod --version 2>/dev/null # gnu's not unix
if chmod --version &>/dev/null # gnu's not unix
complete chmod -s c -l changes -d 'Like -v but report only changes'
complete chmod -l no-preserve-root -d 'Don\'t treat / special (default)'
complete chmod -l preserve-root -d 'Fail to operate recursively on /'