From e5e13af6d540235a0818406f8751883e63b9675b Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 29 Oct 2015 22:36:30 -0400 Subject: cli_show_prompt(): Show default value --- (limited to 'src/ui') 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}" -- cgit v0.9.1