diff options
Diffstat (limited to 'src/grp-utils/systemd-path')
-rw-r--r-- | src/grp-utils/systemd-path/Makefile | 6 | ||||
-rw-r--r-- | src/grp-utils/systemd-path/systemd-path.completion.zsh | 18 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/grp-utils/systemd-path/Makefile b/src/grp-utils/systemd-path/Makefile index e2e40e0121..d8abf0f2ee 100644 --- a/src/grp-utils/systemd-path/Makefile +++ b/src/grp-utils/systemd-path/Makefile @@ -26,9 +26,13 @@ include $(topsrcdir)/build-aux/Makefile.head.mk bin_PROGRAMS += systemd-path systemd_path_SOURCES = \ + sd-path.c \ src/path/path.c systemd_path_LDADD = \ - libsystemd-shared.la + libsystemd-basic.la + +sd.CPPFLAGS += -DLIBDIR=\"$(libdir)\" +sd.CPPFLAGS += -DROOTLIBDIR=\"$(rootlibdir)\" include $(topsrcdir)/build-aux/Makefile.tail.mk 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' |