From c73db02271a67e9ceb42115dde6be997ec4b89ef Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 10 Aug 2016 15:48:20 -0400 Subject: split up grp-{hostname,locale}, grp-resolve/systemd-resolve{,d}; shell completion --- src/grp-utils/systemd-path/systemd-path.completion.zsh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/grp-utils/systemd-path/systemd-path.completion.zsh (limited to 'src/grp-utils/systemd-path') diff --git a/src/grp-utils/systemd-path/systemd-path.completion.zsh b/src/grp-utils/systemd-path/systemd-path.completion.zsh new file mode 100644 index 0000000000..4919cf4250 --- /dev/null +++ b/src/grp-utils/systemd-path/systemd-path.completion.zsh @@ -0,0 +1,18 @@ +#compdef systemd-path + +__get_names() { + systemd-path | { while IFS=: read -r a b; do echo " $a"; done; } +} + +__names() { + local -a _names + _names=(${(fo)"$(__get_names)"}) + typeset -U _names + _describe 'names' _names +} + +_arguments \ + {-h,--help}'[Show help message]' \ + '--version[Show package version]' \ + '--host=[Sufix to append to paths]:suffix' \ + '*:name:__names' -- cgit v1.2.3-54-g00ecf