summaryrefslogtreecommitdiffstats
path: root/shell-completion
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/machinectl8
-rw-r--r--shell-completion/zsh/_journalctl6
-rw-r--r--shell-completion/zsh/_udevadm2
3 files changed, 11 insertions, 5 deletions
diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl
index b28769b..6e89a3c 100644
--- a/shell-completion/bash/machinectl
+++ b/shell-completion/bash/machinectl
@@ -106,8 +106,12 @@ _machinectl() {
comps=$( __get_machines )
elif __contains_word "$verb" ${VERBS[FILE]}; then
- comps=$(compgen -f -- "cur")
- compopt -o filenames
+ if (( COMP_CWORD == i + 1 )); then # first argument after verb
+ comps=$(compgen -f -- "$cur")
+ compopt -o filenames
+ else
+ comps=''
+ fi
fi
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 5dba1e7..b77bf3f 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -59,7 +59,7 @@ _journalctl_boots() {
(( $+functions[_journalctl_facilities] )) ||
_journalctl_facilities() {
local -a _journalctl_facilities
- _journalctl_facilities=(kern user mail daemon auth syslog lpr news uucp cron authpriv ftp local0 local1 local2 local3 local4 local5 local6 local7)
+ _journalctl_facilities=(help kern user mail daemon auth syslog lpr news uucp cron authpriv ftp local0 local1 local2 local3 local4 local5 local6 local7)
_describe 'possible values' _journalctl_facilities
}
@@ -113,10 +113,12 @@ _arguments -s \
'--facility=[Filter messages by facility]:facility:_journalctl_facilities' \
{-t+,--identifier=}'[Filter messages by syslog identifier]:identifier:_journalctl_field_values SYSLOG_IDENTIFIER' \
{-c+,--cursor=}'[Start showing entries from the specified cursor]:cursors:_journalctl_field_values __CURSORS' \
- '--cursor-file=[Show entries using cursor store in file]:file:_files' \
+ '--cursor-file=[Show entries using cursor stored in file]:file:_files' \
'--after-cursor=[Start showing entries from after the specified cursor]:cursors:_journalctl_field_values __CURSORS' \
'--since=[Start showing entries on or newer than the specified date]:YYYY-MM-DD HH\:MM\:SS' \
'--until=[Stop showing entries on or older than the specified date]:YYYY-MM-DD HH\:MM\:SS' \
+ {-g+,--grep=}'[Show entries with MESSAGE field matching PCRE pattern]' \
+ '--case-sensitive=[Force case sensitive or insensitive matching]:boolean:(true false)' \
{-F,--field=}'[List all values a certain field takes]:Fields:_journalctl_fields' \
'--system[Show system and kernel messages]' \
'--user[Show messages from user services]' \
diff --git a/shell-completion/zsh/_udevadm b/shell-completion/zsh/_udevadm
index f7c3384..6d0cc22 100644
--- a/shell-completion/zsh/_udevadm
+++ b/shell-completion/zsh/_udevadm
@@ -155,7 +155,7 @@ _udevadm_commands(){
'test:test an event run'
'test-builtin:test a built-in command'
'wait:wait for devices or device symlinks being created'
- 'lock:lock a block device and run a comand'
+ 'lock:lock a block device and run a command'
)
if ((CURRENT == 1)); then