Skip to content

Instantly share code, notes, and snippets.

@sveitser
Created February 19, 2018 03:58
Show Gist options
  • Save sveitser/5cb4d6f73f9ad99f0264f83e800ae47e to your computer and use it in GitHub Desktop.
Save sveitser/5cb4d6f73f9ad99f0264f83e800ae47e to your computer and use it in GitHub Desktop.
pass-fish-complete-patch
diff --git a/src/completion/pass.fish-completion b/src/completion/pass.fish-completion
index c32a42c..8878acf 100644
--- a/src/completion/pass.fish-completion
+++ b/src/completion/pass.fish-completion
@@ -45,9 +45,8 @@ end
function __fish_pass_print_entries
set -l prefix (__fish_pass_get_prefix)
set -l files
- eval "set files "$prefix"/**.gpg"
+ eval "set files (find "$prefix" -name '*.gpg' | sed 's#$prefix/\(.*\)\.gpg#\1#')"
for file in $files
- set file (echo "$file" | sed "s#$prefix/\(.*\)\.gpg#\1#")
echo "$file"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment