16 lines
487 B
Bash
Executable file
16 lines
487 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; }
|
|
|
|
# TODO: weighted history (see ./launch)
|
|
"${FZFP_PASS_CMD}" $FZFP_PASS_OPTS "$@" \
|
|
"$(fd gpg | sd ".gpg" "" | fzf --height "$FZFP_HEIGHT" --prompt "$FZFP_PROMPT")"
|
|
|
|
cd - >/dev/null || return 1
|