mirror of
https://github.com/systemd/systemd.git
synced 2025-01-07 21:18:41 +03:00
bash-completion/journalctl: list user units when --user is already specified
Follow-up for 52051dd84c
.
Fixes #35794.
This commit is contained in:
parent
89c4fe6c21
commit
0578c26bd6
@ -94,7 +94,11 @@ _journalctl() {
|
|||||||
compopt -o nosort
|
compopt -o nosort
|
||||||
;;
|
;;
|
||||||
--unit|-u)
|
--unit|-u)
|
||||||
comps=$(journalctl -F '_SYSTEMD_UNIT' 2>/dev/null)
|
if __contains_word "--user" ${COMP_WORDS[*]}; then
|
||||||
|
comps=$(journalctl -F '_SYSTEMD_USER_UNIT' 2>/dev/null)
|
||||||
|
else
|
||||||
|
comps=$(journalctl -F '_SYSTEMD_UNIT' 2>/dev/null)
|
||||||
|
fi
|
||||||
# Similarly to systemctl, we need to distinguish between
|
# Similarly to systemctl, we need to distinguish between
|
||||||
# escaped and unescaped names in order to be able to correctly
|
# escaped and unescaped names in order to be able to correctly
|
||||||
# complete them. In this particular case, if the name we're
|
# complete them. In this particular case, if the name we're
|
||||||
|
Loading…
Reference in New Issue
Block a user