summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-05 23:03:26 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-05 23:03:26 +0100
commit6b786fa7e6d83688729b236d00afb6dd25b6dbb5 (patch)
treef5496dfb3b7e029644f0522966123180f9882de3
parentb5280c920e981bcc15656c1e340ed476868c09eb (diff)
readline: Increase terminal compatibility
-rw-r--r--.config/readline/inputrc11
1 files 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