From 3b0f9911e23f15b12acc4ad17e44eba6e3461258 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 29 Sep 2015 16:40:47 +0200 Subject: [PATCH] Move setfacl completions to `string` --- share/completions/setfacl.fish | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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'