summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-08 13:17:50 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-08 13:17:50 +0200
commit6f0a7bc942e633d93f4d996a1bf3ee0792d1e3d2 (patch)
treeb850eec425142e2ba9c801440ba6b9c19ec4f81b
parent8cd1f322f47d48cae6bb142aa778728983db883f (diff)
added check if there is a login
-rwxr-xr-xbin/guiscripts/fillpass6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/guiscripts/fillpass b/bin/guiscripts/fillpass
index 87e74ca..358afd1 100755
--- a/bin/guiscripts/fillpass
+++ b/bin/guiscripts/fillpass
@@ -9,5 +9,7 @@ pass="$(
login="$(pass show "$pass" | awk '/^login:/ {print $2}')"
password="$(pass show "$pass" | head -n 1)"
-printf '%s\t%s\n' "$login" "$password" |
- ydotool type -f -
+if [ "$login" ]
+then printf '%s\t%s\n' "$login" "$password" | ydotool type -f -
+else printf '%s\n' "$password" | ydotool type -f -
+fi