completions
This commit is contained in:
parent
c59fc57dd4
commit
d357b591c9
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo 'This script is deprecated. Install and use the pass-otp extension.
|
||||
yay -S pass-otp
|
||||
pass otp $args'
|
||||
exit 1
|
|
@ -19,4 +19,27 @@ else if test -f /opt/asdf-vm/asdf.fish
|
|||
source /opt/asdf-vm/asdf.fish
|
||||
end
|
||||
|
||||
if test -f /usr/share/password-store/extensions/otp.bash
|
||||
source $FISH_PATH/pass-otp-completions.fish
|
||||
end
|
||||
|
||||
if test -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
set nix_profiles /nix/var/nix/profiles/default $HOME/.nix-profile
|
||||
set --export --universal NIX_PROFILES "$nix_profiles"
|
||||
|
||||
if set -q NIX_SSL_CERT_FILE
|
||||
:
|
||||
elif test -e /etc/ssl/certs/ca-certificates.crt
|
||||
set --export --universal NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
||||
else
|
||||
for p in (string split $NIX_PROFILES)
|
||||
test -e $p/etc/ssl/certs/ca-bundle.crt && \
|
||||
set --export --universal NIX_SSL_CERT_FILE=$p/etc/ssl/certs/ca-bundle.crt
|
||||
end
|
||||
end
|
||||
|
||||
set --prepend --export --global fish_user_paths $HOME/.nix-profile/bin /nix/var/nix/profiles/default/bin
|
||||
end
|
||||
|
||||
|
||||
test $PWD = $HOME && begin; cd $NICE_HOME || cd; end
|
||||
|
|
4
common/fish/pass-otp-completions.fish
Normal file
4
common/fish/pass-otp-completions.fish
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env fish
|
||||
complete -c pass -f -n '__fish_pass_needs_command' -a otp -d 'Command: show TOTP code'
|
||||
complete -c pass -f -n '__fish_pass_uses_command otp' -s c -l clip -d 'Put TOTP code in clipboard'
|
||||
complete -c pass -f -n '__fish_pass_uses_command otp' -a "(__fish_pass_print_entries)"
|
Reference in a new issue