]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shell-completion: on zsh, systemd-cat is a precommand
authorhydrargyrum <hydrargyrum@users.noreply.github.com>
Tue, 30 Apr 2024 14:02:22 +0000 (16:02 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 9 May 2024 11:25:32 +0000 (13:25 +0200)
_precommand lets zsh complete other commands and their arguments
e.g. it can complete grep with "systemd-cat gr" and complete grep options
with "systemd-cat grep -"

shell-completion/zsh/_systemd

index 5547b0cbcb4ec80f04231d10e3b645e09018bfe3..eab7e0efdf7c0a16154ed935c47debaacfdd3ba9 100644 (file)
@@ -19,8 +19,8 @@ case "$service" in
             '(-t --identifier)'{-t+,--identifier=}'[Set syslog identifier.]:syslog identifier:' \
             '(-p --priority)'{-p+,--priority=}'[Set priority value.]:value:({0..7})' \
             '--level-prefix=[Control whether level prefix shall be parsed.]:boolean:(1 0)' \
-            '--namespace=[Connect to specified journal namespace.]:journal namespace:' \
-            ':Message'
+            '--namespace=[Connect to specified journal namespace.]:journal namespace:'
+        _precommand
         ;;
     systemd-cgls)
         _arguments \