[systemd-devel] [PATCH] shell-completion: prevent mangling unit names (bash)

Eric Cook llua at gmx.com
Sat Jul 26 22:14:35 PDT 2014


On 07/26/2014 07:52 PM, Zbigniew Jędrzejewski-Szmek wrote:
> Unfortunately it works only partially. It seems that completions are generated
> properly, but bash doesn't seem to be able to continue after a backslash,
> so one has to copy in the remaining part by hand.
>
> Zbyszek
Hm... (I think)Once we add our own `\' to escape the unit name, the
compgen tests fails to match units. (lines 116, 121 and 225)
That can be avoided in a hack-ish way by escaping `cur' with
`cur=${cur//\\/\\\\}' but when completing the unit like 'dev-<tab> (with
the quote) the additional `\' are still inserted.

So... i'll look more into it, i may be over thinking it. :D


More information about the systemd-devel mailing list