diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-10-11 19:07:05 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-10-11 19:07:05 -0700 |
| commit | e9c75a78375cff98bb844d6db8ce15d965cba320 (patch) | |
| tree | b75d6d2533a1cddb5be833cc6ac09b8b2c170836 /bb.h | |
| parent | 4cc2bd59c3fcc877aab1a9060aa3e6d741b63f1a (diff) | |
Use `tput cvvis` and `tput civis` for cursor visibility and fix for `>`
shell mode not showing cursor.
Diffstat (limited to 'bb.h')
| -rw-r--r-- | bb.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -241,20 +241,21 @@ static const char *bbcmdfn = "bb() {\n" ASK ";\n" #else " [ $# -lt 2 ] && printf '\033[31;1mNot enough args to ask!\033[0m\n' && return 1;\n" -" printf \"\033[1m%s\033[0m\033[?25h\" \"$2\" >/dev/tty;\n" -" read $1 </dev/tty >/dev/tty\n" +" printf \"\033[1m%s\033[0m\" \"$2\" >/dev/tty;\n" +" tput cvvis >/dev/tty;\n" +" read $1 </dev/tty >/dev/tty;\n" #endif "}\n" "ask1() {\n" #ifdef ASK1 ASK1 ";\n" #else -" printf \"\033[?25l\" >/dev/tty;\n" +" tput civis >/dev/tty;\n" " printf \"\033[1m%s\033[0m\" \"$2\" >/dev/tty;\n" " stty -icanon -echo >/dev/tty;\n" " eval \"$1=\\$(dd bs=1 count=1 2>/dev/null </dev/tty)\";\n" " stty icanon echo >/dev/tty;\n" -" printf \"\033[?25h\" >/dev/tty;\n" +" tput cvvis >/dev/tty;\n" #endif "}\n" "confirm() {\n" |
