tessen

default description
git clone https://git.awy.one/tessen.git
Log | Files | Refs | README | LICENSE

commit c372d15dfaf3b9e1a630939fa4df2b176deb533e
parent 9c07554223f8045ffae0256939588c2578404964
Author: Ayush Agarwal <ayush@fastmail.in>
Date:   Sat,  6 Nov 2021 21:25:58 +0530

fix: don't parse the 'username' and 'password' key

tessen wasn't excluding 'username' and 'password' as a key from the menu
which isn't expected behaviour because the value of username is
determined from the basename of the selected file and password is
selected from the first line of the file

Diffstat:
Mtessen | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tessen b/tessen @@ -61,7 +61,7 @@ get_pass_data() { # skip the password, validate each entry against $passdata_regex, store valid results # ASSUMPTION: each key is unique otherwise, the value of the last non-unique key will be used for idx in "${passdata[@]:1}"; do - if [[ "$idx" =~ $passdata_regex ]]; then + if [[ "${idx%%:*}" != "username" && "${idx%%:*}" != "password" && "$idx" =~ $passdata_regex ]]; then key="${idx%%:*}" val="${idx#*: }" PASSDATA_ARR["$key"]="$val"