15 lines
311 B
Bash
15 lines
311 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
if [ ! -z "$PASSWORD_STORE_DIR" ]; then
|
||
|
cd "$PASSWORD_STORE_DIR"
|
||
|
else
|
||
|
cd "$HOME/.password-store"
|
||
|
fi
|
||
|
|
||
|
if [ -z $@ ]; then
|
||
|
find -name \*.gpg | sed 's/\.\/\(.*\)\.gpg/\1/'
|
||
|
else
|
||
|
#nohup pass show -c "$@" >/dev/null &
|
||
|
nohup sh -c "pass show \"$@\" | head -n 1 | wl-copy --trim-newline" >/dev/null &
|
||
|
fi
|