]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bash-completion: use default completion for redirect operators
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 23 Mar 2019 20:49:17 +0000 (21:49 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 23 Mar 2019 20:50:50 +0000 (21:50 +0100)
shell-completion/bash/journalctl

index f2e882ca00911a939e537bcaf129803cd35da076..cdb1fc7cb4ffeb3d65839b7de37305e27d1e9822 100644 (file)
@@ -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)