Skip to content

Commit 00b44da

Browse files
A Dynamic Collection of Shell Scripts with Educational Purpose
1 parent 5c2049c commit 00b44da

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

scripts/ble-simple

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,11 @@ _cs_redraw() {
603603
else
604604
colored="$_CS_BUFFER"
605605
fi
606-
printf '\r\e[2K%s%s' "$_CS_PS1_LAST" "$colored" >&2
606+
if [[ -z "$TERMUX_VERSION" ]]; then
607+
printf '\r\e[2K%s%s' "$_CS_PS1_LAST" "$colored" >&2
608+
else
609+
printf '\e[2K\r%s%s' "$_CS_PS1_LAST" "$colored" >&2
610+
fi
607611
printf '\r\e[%dG' "$(( _CS_PS1_LEN + _CS_POS + 1 ))" >&2
608612
_gt_overlay
609613
fi
@@ -697,9 +701,8 @@ _cs_do_tab() {
697701
local line="$_CS_BUFFER" point=$_CS_POS
698702
local after="${line:$point}"
699703
local word_start=$point
700-
local prev_char=""
701704
while (( word_start > 0 )); do
702-
prev_char="${line:$((word_start-1)):1}"
705+
local prev_char="${line:$((word_start-1)):1}"
703706
if [[ "$prev_char" == " " ]]; then
704707
break
705708
fi

0 commit comments

Comments
 (0)