mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
nix: rename fzf_pass
This commit is contained in:
parent
91219e583e
commit
d29efab025
2 changed files with 2 additions and 2 deletions
|
|
@ -1,30 +0,0 @@
|
|||
function fzf_pass
|
||||
|
||||
set selected \
|
||||
(begin
|
||||
fd -tf . $PASSWORD_STORE_DIR | sed "s|^$PASSWORD_STORE_DIR/\(.*\)\.gpg\$|\1|"
|
||||
end | fzf)
|
||||
|
||||
if [ -z "$selected" ]
|
||||
echo Nothing selected
|
||||
echo exiting...
|
||||
return
|
||||
end
|
||||
|
||||
set mode \
|
||||
(begin
|
||||
echo "password"
|
||||
echo "otp"
|
||||
echo "all"
|
||||
end | fzf)
|
||||
|
||||
switch "$mode"
|
||||
case all
|
||||
pass "$selected" | nvim +"setlocal buftype=nofile bufhidden=hide noswapfile"
|
||||
case password
|
||||
pass "$selected" -c
|
||||
case otp
|
||||
pass otp "$selected" -c
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue