some fixes
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
32bd52a878
commit
6eb19300e1
13
jspass
13
jspass
|
@ -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…
Reference in New Issue
Block a user