fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
9367d4ff7
master
1function __fish_facl_list_spec_keyword 2for keywordin default user group mask other 3echo $keyword : 4end 5end 6 7function __fish_facl_starts_with_spec_user 8commandline -ct| string match -r"u(ser)?:" 9end 10 11function __fish_facl_starts_with_spec_group 12commandline -ct| string match -r"g(roup)?:" 13end 14 15function __fish_facl_extract_acl 16commandline -ct| string replace -ar'.*(\w*:).*' '$1' 17end 18 19complete -c setfacl -s m -s x -l modify -l remove -l set -n __fish_facl_starts_with_spec_user -a'(__fish_facl_extract_acl)(__fish_complete_users | string replace -a "\t" ":\t")' 20complete -c setfacl -s m -s x -l modify -l remove -l set -n __fish_facl_starts_with_spec_group -a'(__fish_facl_extract_acl)(__fish_complete_groups | string replace -a "\t" ":\t")' 21complete -c setfacl -f -s m -s x -l modify -l remove -l set -a'(__fish_facl_list_spec_keyword)' 22 23complete -c setfacl -s b -l remove-all -d'Remove all extended ACL entries' 24complete -c setfacl -s k -l remove-default -d'Remove the Default ACL' 25complete -c setfacl -s n -l no-mask -d'Do not recalculate the effective rights mask' 26complete -c setfacl -l mask -d'Do recalculate the effective rights mask' 27complete -c setfacl -s d -l default -d'All operations apply to the Default ACL' 28complete -c setfacl -l restore -d'Restore a permission backup created by `getfacl -R\' or similar' 29complete -c setfacl -l test -d'Test mode' 30complete -c setfacl -s R -l recursive -d'Apply operations to all files and directories recursively' 31complete -c setfacl -s L -l logical -d'Logical walk, follow symbolic links to directories' 32complete -c setfacl -s P -l physical -d'Physical walk, do not follow symbolic links to directories' 33complete -c setfacl -f -s v -l version -d'Print the version of setfacl and exit' 34complete -c setfacl -f -s h -l help -d'Print help explaining the command line options' 35complete -c setfacl -s m -l modify -d'Modify the current ACL(s) of file(s)' 36complete -c setfacl -s x -l remove -d'Remove entries from the ACL(s) of file(s)' 37complete -c setfacl -s M -l modify-file -d'Read ACL entries to modify from file' 38complete -c setfacl -s X -l remove-file -d'Read ACL entries to remove from file' 39complete -c setfacl -l set-file -d'Read ACL entries to set from file' 40complete -c setfacl -l set -d'Set the ACL of file(s), replacing the current ACL'