Add default value argument to input prompts in add recipe

This commit is contained in:
Chris Kruining 2026-02-23 08:17:09 +01:00
parent e1614dc3f7
commit eed7d360c8
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2

View file

@ -49,10 +49,10 @@ add:
jq -r 'to_entries | map(.key)[]' <<< "$data" \ jq -r 'to_entries | map(.key)[]' <<< "$data" \
| gum choose --header 'Which organisation to save to?' --select-if-one | gum choose --header 'Which organisation to save to?' --select-if-one
` `
username=`input 'user name'` username=`input 'user name' ''`
email=`input 'email'` email=`input 'email' ''`
first_name=`input 'first name'` first_name=`input 'first name' ''`
last_name=`input 'last name'` last_name=`input 'last name' ''`
user_exists=`jq --arg 'org' "$org" --arg 'username' "$username" '.[$org][$username]? | . != null' <<< "$data"` user_exists=`jq --arg 'org' "$org" --arg 'username' "$username" '.[$org][$username]? | . != null' <<< "$data"`