From: Yu Watanabe Date: Thu, 2 Jan 2025 02:50:38 +0000 (+0900) Subject: bash-completion/journalctl: also escape the current input of user unit X-Git-Tag: v258-rc1~1757^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F35799%2Fhead;p=thirdparty%2Fsystemd.git bash-completion/journalctl: also escape the current input of user unit Follow-up for cec82cb943d0fd23dd09309be62c6bcde6b47839. --- diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl index e70d7999055..e7b8d57902d 100644 --- a/shell-completion/bash/journalctl +++ b/shell-completion/bash/journalctl @@ -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)