Skip to content

Instantly share code, notes, and snippets.

@brainplot
Created February 29, 2020 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brainplot/07f30388203b4e5d114cbca16e929577 to your computer and use it in GitHub Desktop.
Save brainplot/07f30388203b4e5d114cbca16e929577 to your computer and use it in GitHub Desktop.
Patch to fix Fish completions for password-store when the vault is empty
diff --git a/src/completion/pass.fish-completion b/src/completion/pass.fish-completion
index 8637874..a974d7e 100644
--- a/src/completion/pass.fish-completion
+++ b/src/completion/pass.fish-completion
@@ -39,7 +39,8 @@ function __fish_pass_print
set -l ext $argv[1]
set -l strip $argv[2]
set -l prefix (__fish_pass_get_prefix)
- printf '%s\n' "$prefix"/**"$ext" | sed "s#$prefix/\(.*\)$strip#\1#"
+ set -l matches "$prefix"/**"$ext"
+ printf '%s\n' $matches | sed "s#$prefix/\(.*\)$strip#\1#"
end
function __fish_pass_print_entry_dirs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment