1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-03 13:47:04 +03:00

Merge pull request #12089 from mrc0mmand/journalctl-bash-comp-redirection

bash-completion: use the default completion for shell redirect operators
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-03-25 14:22:15 +01:00 committed by GitHub
commit 3e7c973f1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,13 @@ _journalctl() {
--vacuum-size --vacuum-time --vacuum-files --output-fields' --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 if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then
case $prev in case $prev in
--boot|-b) --boot|-b)