diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-11-06 17:22:12 +0100 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-11-06 17:22:12 +0100 |
| commit | 8df4cceca0a27f192ae57bbc117674a8773082df (patch) | |
| tree | 67d6165a1b0b57b45a27e49f3300a680de10a5dc /bb.h | |
| parent | d577fa5a5608350d94c14a53c2c8116dd7306462 (diff) | |
Added printing to `ask1` command
Diffstat (limited to 'bb.h')
| -rw-r--r-- | bb.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -264,6 +264,11 @@ static const char *bbcmdfn = "bb() {\n" " printf \"%s\\0\" \"$arg\" >> $BBCMD;\n" " done;\n" "}\n" +"butt() {\n" +" input=\"$(cat)\"\n" +" printf \"\\033[$(echo \"$input\" | wc -l)A\\033[J\" >/dev/tty\n" +" echo \"$input\"\n" +"}\n" "ask() {\n" #ifdef ASK ASK ";\n" @@ -290,7 +295,7 @@ ASK1 ";\n" #ifdef CONFIRM CONFIRM ";\n" #else -" ask1 REPLY \"\033[1mIs that okay? [y/N] \" && [ \"$REPLY\" = 'y' ];\n" +" ask1 REPLY \"$1\033[0;1mIs that okay? [y/N] \" && [ \"$REPLY\" = 'y' ];\n" #endif "}\n" "pause() {\n" |
