[systemd-devel] [PATCH] Add zsh completion

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sat Oct 27 17:26:08 PDT 2012


On Fri, Oct 26, 2012 at 11:27:56AM -0400, Daniel Wallace wrote:
> On Fri, Oct 26, 2012 at 08:41:50AM -0400, Dave Reisner wrote:
> > On Fri, Oct 26, 2012 at 05:58:41AM -0400, Daniel Wallace wrote:
> > > From: Daniel Wallace <daniel.wallace at gatech.edu>
> > > 
> > > I updated the zsh completion from zsh, and added completion for all the
> > > other *ctl commands
> > > ---
> > >  Makefile.am                                |   4 +
> > >  bash-completion/systemd-zsh-completion.zsh | 718 +++++++++++++++++++++++++++++
> > >  2 files changed, 722 insertions(+)
> > >  create mode 100644 bash-completion/systemd-zsh-completion.zsh
> > 
> > Why duplicate the entire completion file here, and not just offer the
> > additions to ZSH's upstream? Have you talked to the ZSH devs about this?
> > 
> > /confused
> I did email the zsh-workers list, and the only response I got was "Do
> what works" and since systemd keeps changing and releases far more
> often than zsh does, I feel that it should just be in the upstream
> package, instead of in
> /usr/share/zsh/functions/Completion/Unix/_systemd.
> so I updated it and sent it here :)
Hi,

I think that this patch should go in.

Rationale: there are a few approaches (how to provide up-to-date completion
for ZSH):

1. keep status quo, i.e. do nothing special for ZSH here,
2. merge Ramkumar Ramachandra's patch [1] to use the bash completion
   script with zsh,
3. provide a separate zsh completion script in systemd codebase, i.e.
   this patch.

Option 1 is not good, because like Daniel says, there's no way that
it'll ever be up to date. Option 2 will not provide full ZSH features,
since bash'es completion systemd is poorer. So option 3 remains.

Dave, since you primarily take care of completion, what do you think?

[1] http://lists.freedesktop.org/archives/systemd-devel/2011-December/003984.html

Zbyszek


More information about the systemd-devel mailing list