diff options
author | Ayush Agarwal <ayush@fastmail.in> | 2022-02-16 22:42:03 +0530 |
---|---|---|
committer | Ayush Agarwal <ayush@fastmail.in> | 2022-02-16 22:42:03 +0530 |
commit | c10159445cc8a75ea8adce825b0fb224aa7e77e1 (patch) | |
tree | 93e71e0dde2c98e389c6fa28a7169d456783725a | |
parent | 4f03711a317c2409fa420909cc6005aa1af8be1a (diff) |
refactor: trap the INT signal as well
in addition, if a user selects gopass as the pass backend, use the
`get_gopass_files` function
-rwxr-xr-x | tessen | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -827,20 +827,15 @@ main() { done unset -v _opt tmp_opts - if [[ -z "${tsn_backend}" ]]; then - tsn_backend="$(find_backend)" + trap '_clear' EXIT TERM INT + if [[ "$pass_backend" == "pass" ]]; then + get_pass_files + elif [[ "$pass_backend" == "gopass" ]]; then + get_gopass_files fi - - setup_backend "${tsn_backend}" - - validate_cliptime - readonly tsn_action - - trap '_clear' EXIT TERM - get_pass_file get_pass_data key_menu - trap - EXIT TERM + trap - EXIT TERM INT } main "$@" |