File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ LIBDIR ?= $(PREFIX)/lib
55SYSTEM_EXTENSION_DIR ?= $(LIBDIR ) /password-store/extensions
66MANDIR ?= $(PREFIX ) /man
77BASHCOMPDIR ?= /etc/bash_completion.d
8+ FISHCOMPDIR ?= $(shell pkg-config --variable completionsdir fish || echo "/usr/share/fish/vendor_completions.d/")
89
910all :
1011 @echo " pass-$( PROG) is a shell script and does not need compilation, it can be simply executed."
@@ -20,6 +21,8 @@ install:
2021 install -m0755 $(PROG ) .bash " $( DESTDIR) $( SYSTEM_EXTENSION_DIR) /$( PROG) .bash"
2122 install -d " $( DESTDIR) $( BASHCOMPDIR) /"
2223 install -m 644 pass-otp.bash.completion " $( DESTDIR) $( BASHCOMPDIR) /pass-otp"
24+ install -d " $( DESTDIR) $( FISHCOMPDIR) /"
25+ install -m 644 pass-otp.fish.completion " $( DESTDIR) $( FISHCOMPDIR) /pass-otp.fish"
2326 @echo
2427 @echo " pass-$( PROG) is installed succesfully"
2528 @echo
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env fish
2+
3+ source " /usr/share/fish/vendor_completions.d/pass.fish"
4+
5+ complete -c pass -f -n ' __fish_pass_needs_command' -a otp -d ' Command: Generate an OTP code'
6+ complete -c pass -f -n ' __fish_pass_uses_command otp' -s c -l clip -d ' Put otp code in clipboard'
7+ complete -c pass -f -n ' __fish_pass_uses_command otp' -a " (__fish_pass_print_entries)"
You can’t perform that action at this time.
0 commit comments