Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation
On Thu, Jul 25, 2013 at 02:00:06PM -0500, William Giokas wrote: Moved zsh shell completion to shell-completion/zsh/_systemd for automake's sake. Also allow users to specify where the files should go with:: Makes sense, imho. Should we go one step further and split _systemd like the bash completions were split? This would have at least the advantage that people packaging a subset of systemd could package a subset of completion scripts. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation
On Mon, Jul 29, 2013 at 04:07:31PM +0200, Zbigniew Jędrzejewski-Szmek wrote: On Thu, Jul 25, 2013 at 02:00:06PM -0500, William Giokas wrote: Moved zsh shell completion to shell-completion/zsh/_systemd for automake's sake. Also allow users to specify where the files should go with:: Makes sense, imho. Should we go one step further and split _systemd like the bash completions were split? This would have at least the advantage that people packaging a subset of systemd could package a subset of completion scripts. Sorry, replied off list first. Originally this was there just to have the make install put zsh completion files in the right place. I would be open to doing this, however there are quite a few shared functions between commands, and as I have been told, there isn't really a good way to source or store the shared functions. I'm still going to try, but I make no promises. Thanks, -- William Giokas | KaiSforza | http://kaictl.net/ GnuPG Key: 0x73CD09CF Fingerprint: F73F 50EF BBE2 9846 8306 E6B8 6902 06D8 73CD 09CF pgpxLMAg4adI5.pgp Description: PGP signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation
On Mon, Jul 29, 2013 at 12:23:54PM -0500, William Giokas wrote: On Mon, Jul 29, 2013 at 04:07:31PM +0200, Zbigniew Jędrzejewski-Szmek wrote: On Thu, Jul 25, 2013 at 02:00:06PM -0500, William Giokas wrote: Moved zsh shell completion to shell-completion/zsh/_systemd for automake's sake. Also allow users to specify where the files should go with:: Makes sense, imho. Should we go one step further and split _systemd like the bash completions were split? This would have at least the advantage that people packaging a subset of systemd could package a subset of completion scripts. Sorry, replied off list first. Originally this was there just to have the make install put zsh completion files in the right place. I would be open to doing this, however there are quite a few shared functions between commands, and as I have been told, there isn't really a good way to source or store the shared functions. I'm still going to try, but I make no promises. I take back what I just said. All that really stands out is the -H completion, and that is just a few lines that I don't feel bad about having in all of the files. Currently I have 13 different files:: _hostnamectl _journalctl _localectl _loginctl _machinectl _systemctl _systemd _systemd-analyze _systemd-coredumpctl _systemd-inhibit _systemd-nspawn _timedatectl _udevadm with _systemd being the kind of 'fallback' option, containing the systemd commands that are less complex, and don't require as much in the way of functions (most simply use 'flag:desc:(a b c)' or some such). Thanks, -- William Giokas | KaiSforza | http://kaictl.net/ GnuPG Key: 0x73CD09CF Fingerprint: F73F 50EF BBE2 9846 8306 E6B8 6902 06D8 73CD 09CF pgpANqVtnodp6.pgp Description: PGP signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation
On Mon, Jul 29, 2013 at 04:07:31PM +0200, Zbigniew Jędrzejewski-Szmek wrote: On Thu, Jul 25, 2013 at 02:00:06PM -0500, William Giokas wrote: Moved zsh shell completion to shell-completion/zsh/_systemd for automake's sake. Also allow users to specify where the files should go with:: Makes sense, imho. Should we go one step further and split _systemd like the bash completions were split? This would have at least the advantage that people packaging a subset of systemd could package a subset of completion scripts. Please refer to the git pull request I sent in: http://lists.freedesktop.org/archives/systemd-devel/2013-July/012387.html -- William Giokas | KaiSforza | http://kaictl.net/ GnuPG Key: 0x73CD09CF Fingerprint: F73F 50EF BBE2 9846 8306 E6B8 6902 06D8 73CD 09CF pgpUbx2qKr1PC.pgp Description: PGP signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation
On 7-26-13 00:41:11 Michael Biebl wrote: 2013/7/25 William Giokas 1007...@gmail.com: Moved zsh shell completion to shell-completion/zsh/_systemd for automake's sake. Also allow users to specify where the files should go with:: ./configure --with-zshcompletiondir=/path/to/some/where and by default going to `$datadir/zsh/site-functions` I was told [1], the directory for 3rd party packages would be /usr/share/zsh/vendor-completions. But I'm not a zsh user, so I'm just paroting what I read there. If it's any help, I am a zsh user and Fedora 19 has this file installed on my system: /usr/share/zsh/5.0.2/functions/_systemd My /usr/share/zsh/site-functions directory is empty. -- Garry T. Williams ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation
On Sat, Jul 27, 2013 at 5:30 PM, Garry T. Williams gtwilli...@gmail.comwrote: On 7-26-13 00:41:11 Michael Biebl wrote: 2013/7/25 William Giokas 1007...@gmail.com: Moved zsh shell completion to shell-completion/zsh/_systemd for automake's sake. Also allow users to specify where the files should go with:: ./configure --with-zshcompletiondir=/path/to/some/where and by default going to `$datadir/zsh/site-functions` I was told [1], the directory for 3rd party packages would be /usr/share/zsh/vendor-completions. But I'm not a zsh user, so I'm just paroting what I read there. If it's any help, I am a zsh user and Fedora 19 has this file installed on my system: /usr/share/zsh/5.0.2/functions/_systemd My /usr/share/zsh/site-functions directory is empty. -- Garry T. Williams ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel That version is the old systemd completion that is still in the last zsh release, from before I moved it to the systemd repository and added a most of the other commands and options -- Daniel Wallace ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] shell-completion: fix zsh completion installation
Moved zsh shell completion to shell-completion/zsh/_systemd for automake's sake. Also allow users to specify where the files should go with:: ./configure --with-zshcompletiondir=/path/to/some/where and by default going to `$datadir/zsh/site-functions` --- Honestly, this is my first foray into autotools, hence the simple rename instead of some logic in the Makefile.am or configure.ac. I also think it cleans up the shell-completion dir a bit. The 'systemd-zsh-completion.zsh' name always seemed a bit off compared to the bash names. Makefile.am | 7 ++- configure.ac | 6 ++ shell-completion/{systemd-zsh-completion.zsh = zsh/_systemd} | 0 3 files changed, 12 insertions(+), 1 deletion(-) rename shell-completion/{systemd-zsh-completion.zsh = zsh/_systemd} (100%) diff --git a/Makefile.am b/Makefile.am index 7933de6..4e8a3f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -68,6 +68,7 @@ pkgconfigdatadir=$(datadir)/pkgconfig pkgconfiglibdir=$(libdir)/pkgconfig polkitpolicydir=$(datadir)/polkit-1/actions bashcompletiondir=@bashcompletiondir@ +zshcompletiondir=@zshcompletiondir@ rpmmacrosdir=$(prefix)/lib/rpm/macros.d sysvinitdir=$(SYSTEM_SYSVINIT_PATH) sysvrcnddir=$(SYSTEM_SYSVRCND_PATH) @@ -342,6 +343,9 @@ dist_bashcompletion_DATA = \ shell-completion/bash/systemd-analyze \ shell-completion/bash/udevadm +dist_zshcompletion_DATA = \ + shell-completion/zsh/_systemd + dist_sysctl_DATA = \ sysctl.d/50-default.conf @@ -4238,7 +4242,7 @@ EXTRA_DIST += \ docs/var-log/README.in EXTRA_DIST += \ - shell-completion/systemd-zsh-completion.zsh + shell-completion/zsh/_systemd SOCKETS_TARGET_WANTS += \ systemd-initctl.socket \ @@ -4354,6 +4358,7 @@ DISTCHECK_CONFIGURE_FLAGS = \ --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \ --with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \ --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \ + --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \ --with-pamlibdir=$$dc_install_base/$(pamlibdir) \ --with-rootprefix=$$dc_install_base \ --disable-split-usr diff --git a/configure.ac b/configure.ac index 759073a..3028028 100644 --- a/configure.ac +++ b/configure.ac @@ -911,6 +911,10 @@ AC_ARG_WITH([bashcompletiondir], with_bashcompletiondir=${datadir}/bash-completion/completions ])]) +AC_ARG_WITH([zshcompletiondir], +AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]), +[], [with_zshcompletiondir=${datadir}/zsh/site-functions]) + AC_ARG_WITH([rootprefix], AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), [], [with_rootprefix=${ac_default_prefix}]) @@ -955,6 +959,7 @@ AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir]) AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir]) AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir]) AC_SUBST([bashcompletiondir], [$with_bashcompletiondir]) +AC_SUBST([zshcompletiondir], [$with_zshcompletiondir]) AC_SUBST([pamlibdir], [$with_pamlibdir]) AC_SUBST([rootprefix], [$with_rootprefix]) AC_SUBST([rootlibdir], [$with_rootlibdir]) @@ -1032,6 +1037,7 @@ AC_MSG_RESULT([ D-Bus system dir:${with_dbussystemservicedir} D-Bus interfaces dir:${with_dbusinterfacedir} Bash completions dir:${with_bashcompletiondir} +Zsh completions dir: ${with_zshcompletiondir} Extra start script: ${RC_LOCAL_SCRIPT_PATH_START} Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP} Debug shell: ${SUSHELL} @ ${DEBUGTTY} diff --git a/shell-completion/systemd-zsh-completion.zsh b/shell-completion/zsh/_systemd similarity index 100% rename from shell-completion/systemd-zsh-completion.zsh rename to shell-completion/zsh/_systemd -- 1.8.3.4.1180.ge27c933 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation
2013/7/25 William Giokas 1007...@gmail.com: Moved zsh shell completion to shell-completion/zsh/_systemd for automake's sake. Also allow users to specify where the files should go with:: ./configure --with-zshcompletiondir=/path/to/some/where and by default going to `$datadir/zsh/site-functions` I was told [1], the directory for 3rd party packages would be /usr/share/zsh/vendor-completions. But I'm not a zsh user, so I'm just paroting what I read there. Michael [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717540#15 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel