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
5
5
SYSTEM_EXTENSION_DIR ?= $(LIBDIR ) /password-store/extensions
6
6
MANDIR ?= $(PREFIX ) /man
7
7
BASHCOMPDIR ?= /etc/bash_completion.d
8
+ FISHCOMPDIR ?= $(shell pkg-config --variable completionsdir fish || echo "/usr/share/fish/vendor_completions.d/")
8
9
9
10
all :
10
11
@echo " pass-$( PROG) is a shell script and does not need compilation, it can be simply executed."
@@ -20,6 +21,8 @@ install:
20
21
install -m0755 $(PROG ) .bash " $( DESTDIR) $( SYSTEM_EXTENSION_DIR) /$( PROG) .bash"
21
22
install -d " $( DESTDIR) $( BASHCOMPDIR) /"
22
23
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"
23
26
@echo
24
27
@echo " pass-$( PROG) is installed succesfully"
25
28
@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 $PROG -f -n ' __fish_pass_needs_command' -a otp -d ' Command: Generate an OTP code'
6
+ complete -c $PROG -f -n ' __fish_pass_uses_command otp' -s c -l clip -d ' Put otp code in clipboard'
7
+ complete -c $PROG -f -n ' __fish_pass_uses_command otp' -a " (__fish_pass_print_entries)"
You can’t perform that action at this time.
0 commit comments