diff options
author | Rasmus Steinke <rasi@xssn.at> | 2015-08-13 17:40:52 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2015-08-13 17:40:52 +0200 |
commit | 2f38b32d898f711533b0c47cc4e02ee19f5ae08f (patch) | |
tree | 17d6a76558bc743bac9f6cec024b0c775d40d76d | |
parent | 3b1b48b93d504b87a6b6e05b7db437b26114c6f5 (diff) | |
download | rofi-pass-2f38b32d898f711533b0c47cc4e02ee19f5ae08f.tar.gz |
Handle tabs and spaces
-rwxr-xr-x | rofi-pass | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -77,8 +77,8 @@ ${open_url}: Open URL | ${copy_name}: Copy Username | ${copy_pass}: Copy Passwor declare -A stuff while read LINE; do - _id=$(echo "${LINE}" | awk -F': ' '{print $1}') - _val=$(echo "${LINE}" | awk -F': ' '{print $2}') + _id=$(echo "${LINE}" | awk -F':[[:space:]]*' '{print $1}') + _val=$(echo "${LINE}" | awk -F':[[:space:]]*' '{print $2}') stuff["${_id}"]=${_val} done < <(pass "${selected_password}" | tail -n+2 | grep ': ') stuff["pass"]=${password} |