summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2019-03-23 21:49:17 +0100
committerFrantisek Sumsal <frantisek@sumsal.cz>2019-03-23 21:50:50 +0100
commit1413763ea540a897852494259cb949fe01e1e7e7 (patch)
tree94a73598a3e5337b319daa044f85e773d1bc5a57 /shell-completion
parentfa28e4e37778a825fca19a912ae478994c217e5c (diff)
downloadsystemd-1413763ea540a897852494259cb949fe01e1e7e7.tar.gz
bash-completion: use default completion for redirect operators
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/journalctl7
1 files changed, 7 insertions, 0 deletions
diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl
index f2e882ca00..cdb1fc7cb4 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)