summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-29 22:36:30 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-29 22:42:09 (EDT)
commite5e13af6d540235a0818406f8751883e63b9675b (patch)
treeaa187f35faf6ce0d067cb0bf656fc0ef6cbf236d
parent3ff66e2b64e3013897276e4e1e492e306d697507 (diff)
downloadfirman.sh-e5e13af6d540235a0818406f8751883e63b9675b.zip
firman.sh-e5e13af6d540235a0818406f8751883e63b9675b.tar.gz
firman.sh-e5e13af6d540235a0818406f8751883e63b9675b.tar.bz2
cli_show_prompt(): Show default value
-rw-r--r--src/ui/cli.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/cli.sh b/src/ui/cli.sh
index 4b2854c..384ac6e 100644
--- a/src/ui/cli.sh
+++ b/src/ui/cli.sh
@@ -113,7 +113,11 @@ cli_show_prompt()
printf '%s\n' "${title}" >"${cli_tty}"
{ printf '%s\n' "${title}" | sed 's/./-/g'; } >"${cli_tty}"
- printf '\n> ' >"${cli_tty}"
+ if [ "x${input}" = 'x' ]; then
+ printf '\n> ' >"${cli_tty}"
+ else
+ printf '\n[%s] > ' "${input}" >"${cli_tty}"
+ fi
read -r input
printf '\n' >"${cli_tty}"
printf '%s' "${input}"