diff --git a/share/completions/setfacl.fish b/share/completions/setfacl.fish index 62d0b7605..0f42ef3b0 100644 --- a/share/completions/setfacl.fish +++ b/share/completions/setfacl.fish @@ -7,19 +7,19 @@ function __fish_facl_list_spec_keyword end function __fish_facl_starts_with_spec_user - echo (commandline -ct) | __fish_sgrep -q -E 'u(ser)?:' + commandline -ct | string match -r "u(ser)?:" end function __fish_facl_starts_with_spec_group - echo (commandline -ct) | __fish_sgrep -q -E 'g(roup)?:' + commandline -ct | string match -r "g(roup)?:" end function __fish_facl_extract_acl - echo (commandline -ct) | __fish_sgrep -o -E '\w*:' + commandline -ct | string replace -ar '.*(\w*:).*' '$1' end -complete -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 | sed "s/\t/:\t/g")' -complete -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 | sed "s/\t/:\t/g")' +complete -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")' +complete -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")' complete -c setfacl -f -s m -s x -l modify -l remove -l set -a '(__fish_facl_list_spec_keyword)' complete -c setfacl -s b -l remove-all --description 'Remove all extended ACL entries'