From 6b786fa7e6d83688729b236d00afb6dd25b6dbb5 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 5 Nov 2023 23:03:26 +0100 Subject: readline: Increase terminal compatibility --- .config/readline/inputrc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.config/readline/inputrc b/.config/readline/inputrc index 8c5cb4d..a5d3244 100644 --- a/.config/readline/inputrc +++ b/.config/readline/inputrc @@ -15,8 +15,15 @@ set show-all-if-ambiguous on $if editing-mode == vi # Change cursor to a bar when in insert mode set show-mode-in-prompt on - set vi-ins-mode-string "\1\e[6 q\2" - set vi-cmd-mode-string "\1\e[2 q\2" + + # Taken straight from the Arch Wiki + $if term == linux + set vi-ins-mode-string "\1\e[?0c\2" + set vi-cmd-mode-string "\1\e[?8c\2" + $else + set vi-ins-mode-string "\1\e[6 q\2" + set vi-cmd-mode-string "\1\e[2 q\2" + $endif $endif $if Bash -- cgit v1.2.3