Browse Source

some fixes

Signed-off-by: fbt <fbt@fleshless.org>
master
Jack L. Frost 5 years ago
parent
commit
6eb19300e1
1 changed files with 6 additions and 7 deletions
  1. +6
    -7
      jspass

+ 6
- 7
jspass View File

@ -34,11 +34,6 @@ Opts[selection]="${X_SELECTION:-clipboard}"
Opts[store]="$HOME/.password-store"
Opts[tmp_dir]='/tmp'
# Default flags
Flags[clip]=0
Flags[edit]=0
Flags[pwgen]=0
# Handle arguments
Args error argv "$@" << 'end'
flags
@ -61,7 +56,9 @@ case "$1" in
shift
;;
(cp|edit|git|grep|help|init|insert|ls|mv|rm) exec pass "$@";;
(cp|edit|git|grep|help|init|insert|ls|mv|rm)
exec pass "$@"
;;
esac
case "${Opts[action]:-show}" in
@ -97,7 +94,9 @@ case "${Opts[action]:-show}" in
vault_exists "$vault" || System.die 1 "Vault does not exist: $1"
if vault_is_json "$vault"; then
pass=$(pass "$vault" | jshon -e "$field" -u)
pass=$(pass "$vault" | jshon -e "$field" -u) || {
System.die $? "Failed to extract json data from $vault/$field"
}
else
[[ "$2" ]] && err "Warning: ignoring '$field', because '$vault' is not a json vault"


Loading…
Cancel
Save