From ffa7cd15cd2a9e802827ef0f5762de6c22933c07 Mon Sep 17 00:00:00 2001 From: Daniel Wallace Date: Fri, 1 Mar 2013 14:39:04 +0100 Subject: journalctl: add --user-unit= switch Add --user-unit= to make it possible to query for user logs by the name of the service. --- shell-completion/systemd-bash-completion.sh | 5 ++++- shell-completion/systemd-zsh-completion.zsh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'shell-completion') diff --git a/shell-completion/systemd-bash-completion.sh b/shell-completion/systemd-bash-completion.sh index 7848bafc17..40e66e9d10 100644 --- a/shell-completion/systemd-bash-completion.sh +++ b/shell-completion/systemd-bash-completion.sh @@ -300,7 +300,7 @@ _journalctl() { -h --help -l --local --new-id128 -m --merge --no-pager --no-tail -q --quiet --setup-keys --this-boot --verify --version --list-catalog --update-catalog' - [ARG]='-D --directory -F --field -o --output -u --unit' + [ARG]='-D --directory -F --field -o --output -u --unit --user-unit' [ARGUNKNOWN]='-c --cursor --interval -n --lines -p --priority --since --until --verify-key' ) @@ -320,6 +320,9 @@ _journalctl() { --unit|-u) comps=$(journalctl -F '_SYSTEMD_UNIT') ;; + --user-unit) + comps=$(journalctl -F '_SYSTEMD_USER_UNIT') + ;; *) return 0 ;; diff --git a/shell-completion/systemd-zsh-completion.zsh b/shell-completion/systemd-zsh-completion.zsh index 177a564d38..46e29b217a 100644 --- a/shell-completion/systemd-zsh-completion.zsh +++ b/shell-completion/systemd-zsh-completion.zsh @@ -70,6 +70,7 @@ _ctls() {-c,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \ {-b,--this-boot}'[Show data only from current boot]' \ {-u,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \ + '--user-unit[Show data only from the specified user session unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \ {-p,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \ {-f,--follow}'[Follow journal]' \ {-n,--lines=}'[Number of journal entries to show]:integer' \ -- cgit v1.2.3-54-g00ecf