aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-09-29 16:40:47 +0200
committerGravatar Fabian Homborg <FHomborg@gmail.com>2015-10-04 15:41:20 +0200
commit3b0f9911e23f15b12acc4ad17e44eba6e3461258 (patch)
treec87b83a1ff35880e5cac81b777828819849b0d14
parent55a2945449e7ad02cafd8b35eb7eec32e7c72cf8 (diff)
Move setfacl completions to `string`
-rw-r--r--share/completions/setfacl.fish10
1 files changed, 5 insertions, 5 deletions
diff --git a/share/completions/setfacl.fish b/share/completions/setfacl.fish
index 62d0b760..0f42ef3b 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'