From: Frantisek Sumsal Date: Sat, 23 Mar 2019 20:49:17 +0000 (+0100) Subject: bash-completion: use default completion for redirect operators X-Git-Tag: v242-rc1~71^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1413763ea540a897852494259cb949fe01e1e7e7;p=thirdparty%2Fsystemd.git bash-completion: use default completion for redirect operators --- diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl index f2e882ca009..cdb1fc7cb4f 100644 --- a/shell-completion/bash/journalctl +++ b/shell-completion/bash/journalctl @@ -52,6 +52,13 @@ _journalctl() { --vacuum-size --vacuum-time --vacuum-files --output-fields' ) + # Use the default completion for shell redirect operators + if __contains_word "$prev" '>' '>>' '&>'; then + compopt -o filenames + COMPREPLY=( $(compgen -f -- "$cur") ) + return 0; + fi + if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then case $prev in --boot|-b)