chmod completions for non-GNU chmod

And chgrp fixup.
This commit is contained in:
Aaron Gyes 2022-01-30 19:48:20 -08:00
parent 63960f646b
commit e575a63232
2 changed files with 21 additions and 12 deletions

View File

@ -19,6 +19,6 @@ else # not Linux
complete -c chgrp -s n -d "id is numeric; avoid lookup"
complete -c chgrp -s R -d "Operate recursively"
complete -c chgrp -s v -d "Output filenames"
complete -c chgrp -s x -d "Don'1t traverse fs mount points"
complete -c chgrp -s x -d "Don't traverse fs mountpoints"
complete -c chgrp -d Group -a "(__fish_complete_groups)"
end
end

View File

@ -4,13 +4,22 @@
# man page by the make_completions.py script, but may
# have been hand edited since.
#
complete -c chmod -s c -l changes -d 'Like verbose but report only when a change is made'
complete -c chmod -l no-preserve-root -d 'Do not treat / specially (the default)'
complete -c chmod -l preserve-root -d 'Fail to operate recursively on /'
complete -c chmod -s f -l silent -l quiet -d 'Suppress most error messages'
complete -c chmod -s v -l verbose -d 'Output a diagnostic for every file processed'
complete -c chmod -l reference -d 'Use RFILEs mode instead of MODE values' -r
complete -c chmod -s R -l recursive -d 'Change files and directories recursively'
complete -c chmod -l help -d 'Display help and exit'
complete -c chmod -l version -d 'Display version and exit'
if chmod --version 2>/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 /'
complete chmod -s f -l silent -l quiet -d 'Suppress most errors'
complete chmod -s v -l verbose -d 'Prints each file processed'
complete chmod -l reference -d 'Use RFILEs mode instead of MODE values' -r
complete chmod -s R -l recursive -d 'Operate recursively'
complete chmod -l help -d 'Display help and exit'
complete chmod -l version -d 'Display version and exit'
else # guess it might be unix
complete chmod -s f -d 'Suppress errors'
complete chmod -s H -d "Follow given symlinks with -R"
complete chmod -s h -d "Don't dereference given symlinks"
complete chmod -s L -d "Follow all symlinks with -R"
complete chmod -s P -d "Follow no symlinks with -R"
complete chmod -s R -d 'Operate recursively'
complete chmod -s v -d 'Prints each file processed'
end