invert cut selection to properly trim off LHS of key:value pairs
This commit is contained in:
parent
cfe07838db
commit
8305359a9a
@ -38,7 +38,7 @@ _pass_field() {
|
|||||||
plaintext="$(pass show $password | tail -n +2)"
|
plaintext="$(pass show $password | tail -n +2)"
|
||||||
for line in $plaintext; do
|
for line in $plaintext; do
|
||||||
if [[ $line == $1:* ]]; then
|
if [[ $line == $1:* ]]; then
|
||||||
printf "$(_trim "$(printf "$line" | cut -d: -f2 -s)")"
|
printf "$(_trim "$(printf "$line" | cut -d: -f1 -s --complement)")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
unset IFS
|
unset IFS
|
||||||
|
Reference in New Issue
Block a user