1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-07 21:18:41 +03:00

bash-completion/journalctl: also escape the current input of user unit

Follow-up for cec82cb943.
This commit is contained in:
Yu Watanabe 2025-01-02 11:50:38 +09:00
parent 0578c26bd6
commit bbe1d1bcb0

View File

@ -113,6 +113,10 @@ _journalctl() {
;; ;;
--user-unit) --user-unit)
comps=$(journalctl -F '_SYSTEMD_USER_UNIT' 2>/dev/null) comps=$(journalctl -F '_SYSTEMD_USER_UNIT' 2>/dev/null)
if ! [[ $cur =~ '\\' ]]; then
cur="$(printf '%q' $cur)"
fi
compopt -o filenames
;; ;;
--identifier|-t|--exclude-identifier|-T) --identifier|-t|--exclude-identifier|-T)
comps=$(journalctl -F 'SYSLOG_IDENTIFIER' 2>/dev/null) comps=$(journalctl -F 'SYSLOG_IDENTIFIER' 2>/dev/null)