1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-06 17:18:12 +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)
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)
comps=$(journalctl -F 'SYSLOG_IDENTIFIER' 2>/dev/null)