From 0f0b602415961aa9ca069c9719a0fbb4bbb9941f Mon Sep 17 00:00:00 2001 From: dana Date: Fri, 5 Jan 2018 14:26:17 -0600 Subject: 42231: new completion functions for simple utilities belonging to the 'Darwin' and 'Linux' groups. --- Completion/Unix/Command/_attr | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'Completion/Unix') diff --git a/Completion/Unix/Command/_attr b/Completion/Unix/Command/_attr index df1fb7da4..2030064dc 100644 --- a/Completion/Unix/Command/_attr +++ b/Completion/Unix/Command/_attr @@ -1,4 +1,4 @@ -#compdef attr getfattr setfattr +#compdef attr getfattr setfattr xattr case $service in attr) @@ -45,4 +45,23 @@ case $service in '*:file:_files' return ;; + # The Python xattr module ships with a utility called xattr which might appear + # on some systems; it is not entirely compatible with the Darwin variant, but + # does seem inspired by it, to the degree that this is probably close enough + xattr) + _arguments -s -S -A '-*' : \ + '(: -)'{-h,--help}'[display help information]' \ + '(-c -d -w)-l[display in long format]' \ + '-r[act recursively]' \ + '-s[act on symbolic links]' \ + '(-w)-v[always display file name]' \ + '(-c -d)-x[use hexademical format for value input and output]' \ + '*: :_files' \ + + '(op)' \ + '(-l -x)-c[remove all attributes]' \ + '(-l -x)-d[remove specified attribute]:attribute name' \ + '-p[display value of specified attribute]:attribute name' \ + '(-l -v)-w[set value of specified attribute]:attribute name: :attribute value' + return + ;; esac -- cgit 1.4.1