diff options
-rwxr-xr-x | rofi-pass | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -417,7 +417,11 @@ mainMenu () { fi if [[ -z "${stuff["${USERNAME_field}"]}" ]]; then if [[ -n $default_user ]]; then - stuff["${USERNAME_field}"]="${default_user}" + if [[ "$default_user" == "%filename" ]]; then + stuff["${USERNAME_field}"]="$(basename $selected_password)" + else + stuff["${USERNAME_field}"]="${default_user}" + fi fi fi pass_content="$(for key in "${!stuff[@]}"; do printf '%s\n' "${key}: ${stuff[$key]}"; done)" |