13 lines
451 B
Bash
Executable file
13 lines
451 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
FZFP_PASS_CMD="pass"
|
|
FZFP_PASS_DIR="$HOME/.password-store"
|
|
|
|
FZFP_HEIGHT="${FZFP_HEIGHT:-40%}"
|
|
FZFP_PROMPT="${FZFP_PROMPT:-"$FZFP_PASS_CMD@$FZFP_PASS_DIR> "}"
|
|
FZFP_PASS_OPTS="${FZFP_PASS_OPTS:-}"
|
|
cd "$FZFP_PASS_DIR" || { echo "Could not cd to $FZFP_PASS_DIR" >&2; exit 1; }
|
|
pp="$(fd gpg | sd ".gpg" "" | fzf --height "$FZFP_HEIGHT" --prompt "$FZFP_PROMPT")"
|
|
"${FZFP_PASS_CMD}" $FZFP_PASS_OPTS "$@" "$pp"
|
|
cd - >/dev/null || return 1
|
|
|