diff options
author | TW <tw@waldmann-edv.de> | 2022-01-16 20:29:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 20:29:47 +0100 |
commit | 96e6990bd40c9c4328c8a3a56df126b2ed15c534 (patch) | |
tree | da650c3118c7360fe8620e3981e339366f101394 /scripts | |
parent | 97d6f8145faf74be47cd2a4617b7cb1523d11d1d (diff) | |
parent | 2b67c9f3ee65cb00dcfd7f4636229f1a1daa1d4f (diff) |
Merge pull request #5989 from szpak-forks/fishCompletion330Fix
Fix command & switch completion in Fish 3.3.0+
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/shell_completions/fish/borg.fish | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/shell_completions/fish/borg.fish b/scripts/shell_completions/fish/borg.fish index 86a0e2979..75af73a51 100644 --- a/scripts/shell_completions/fish/borg.fish +++ b/scripts/shell_completions/fish/borg.fish @@ -356,7 +356,7 @@ function __fish_borg_is_dir_a_repository set -l config_content if test -f $argv[1]/README and test -f $argv[1]/config - read config_content < $argv[1]/config ^/dev/null + read config_content < $argv[1]/config 2>/dev/null end return (string match --quiet '[repository]' $config_content) end @@ -365,7 +365,7 @@ function __fish_borg_list_repos_or_archives if string match --quiet --regex '.*::' '"'(commandline --current-token)'"' # If the current token contains "::" then list the archives: set -l repository_name (string replace --regex '::.*' '' (commandline --current-token)) - borg list --format="$repository_name::{archive}{TAB}{comment}{NEWLINE}" "$repository_name" ^/dev/null + borg list --format="$repository_name::{archive}{TAB}{comment}{NEWLINE}" "$repository_name" 2>/dev/null else # Otherwise list the repositories, directories and user@host entries: set -l directories (commandline --cut-at-cursor --current-token)*/ @@ -395,7 +395,7 @@ end function __fish_borg_list_only_archives set -l repo_matches (string match --regex '([^ ]*)::' (commandline)) - borg list --format="{archive}{TAB}{comment}{NEWLINE}" "$repo_matches[2]" ^/dev/null + borg list --format="{archive}{TAB}{comment}{NEWLINE}" "$repo_matches[2]" 2>/dev/null end complete -c borg -f -n __fish_borg_is_diff_second_archive -a '(__fish_borg_list_only_archives)' |