On 06/17/2015 12:34 PM, Lennart Poettering wrote:
On Mon, 18.05.15 18:45, Eric Cook (l...@gmx.com) wrote:
By the time __systemctl is called, --user/--system are shifted out of
`words' by _arguments. This patch queries the array sooner.
In the case that both --user and --system
using _wanted instead of calling compadd directly. this allows the user to
customize
possible matches.
An example being, grouping units by type:
autoload -Uz compinit; compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*' format 'Completing %d'
By the time __systemctl is called, --user/--system are shifted out of
`words' by _arguments. This patch queries the array sooner.
In the case that both --user and --system are on the line when compsys runs,
_sys_service_mgr is set to the latter. Which is seemingly how systemctl behaves.
If
I seem to have forgot about _systemctl_active_units().
---
shell-completion/zsh/_systemctl.in | 30 ++
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/shell-completion/zsh/_systemctl.in
b/shell-completion/zsh/_systemctl.in
index a4db563..d3e7ee2
---
shell-completion/zsh/_systemctl.in | 28 +---
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/shell-completion/zsh/_systemctl.in
b/shell-completion/zsh/_systemctl.in
index a4db563..d2ebab0 100644
--- a/shell-completion/zsh/_systemctl.in
+++
---
shell-completion/zsh/_systemctl.in | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/shell-completion/zsh/_systemctl.in
b/shell-completion/zsh/_systemctl.in
index d2ebab0..9b7f962 100644
--- a/shell-completion/zsh/_systemctl.in
+++
compadd's -a option treats non-option arguments as arrays. So
$(_systemctl_get_template_names) expands to some words that aren't
legal array names. Even if there were, they would be empty; thus adding
nothing.
deduplicated a few functions too.
---
shell-completion/zsh/_systemctl.in | 21
---
shell-completion/zsh/_systemctl.in | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/shell-completion/zsh/_systemctl.in
b/shell-completion/zsh/_systemctl.in
index cce9dea..8764e07 100644
--- a/shell-completion/zsh/_systemctl.in
+++
---
shell-completion/zsh/_systemctl.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shell-completion/zsh/_systemctl.in
b/shell-completion/zsh/_systemctl.in
index f30fb84..5a39cfb 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@
---
shell-completion/zsh/_systemctl.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/shell-completion/zsh/_systemctl.in
b/shell-completion/zsh/_systemctl.in
index 5a39cfb..a4db563 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
removed pointless index sort of bootids.
use `compadd -a' to add each array, instead of expanding possibly hundreds of
words needlessly.
optional completion of -b
---
shell-completion/zsh/_journalctl | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
Units with literal hex '\xFF' in their names has to be read
and printed properly.
dev-disk-byx2dlabel-root.device != dev-disk-by\x2dlabel-root.device
---
shell-completion/zsh/_systemctl.in | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git
This looks seems like it should work. I would appreciate it if you could trail
run it.
My use of bash is limited and knowledge of it's completion system even more so.
---
shell-completion/bash/systemctl.in | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
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
14 matches
Mail list logo