feat: Introduce basic vim bindings in prompts (#28)

Signed-off-by: sswastik02 <40518186+sswastik02@users.noreply.github.com>
This commit is contained in:
Swastik Sarkar
2024-06-13 13:47:55 +05:30
committed by GitHub
parent fa201d71be
commit 8b760d13ba
+4 -4
View File
@@ -26,10 +26,10 @@ _key_input() {
local input="${a}${b}" local input="${a}${b}"
# shellcheck disable=SC1087 # shellcheck disable=SC1087
case "$input" in case "$input" in
"$ESC[A") echo up ;; "$ESC[A" | "k") echo up ;;
"$ESC[B") echo down ;; "$ESC[B" | "j") echo down ;;
"$ESC[C") echo right ;; "$ESC[C" | "l") echo right ;;
"$ESC[D") echo left ;; "$ESC[D" | "h") echo left ;;
'') echo enter ;; '') echo enter ;;
' ') echo space ;; ' ') echo space ;;
esac esac