From e8d366bd610ef13fef2c75f3de1fd4976aa025ee Mon Sep 17 00:00:00 2001 From: urosm Date: Tue, 9 Jul 2024 01:50:27 +0200 Subject: [PATCH] `.bashrc`, `readline`: add `readline` config --- .bashrc | 19 ------------------- .config/readline/inputrc | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 .config/readline/inputrc diff --git a/.bashrc b/.bashrc index 99bfa6a..b8587d4 100644 --- a/.bashrc +++ b/.bashrc @@ -9,25 +9,6 @@ HISTCONTROL=ignoredups:erasedups trap "history -n; history -w; history -c; history -r;" EXIT PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND" -# readline -set -o vi -bind 'set show-mode-in-prompt on' -bind 'set vi-ins-mode-string \1\e[01;35m\2+\1\e[0m\2' -bind 'set vi-cmd-mode-string :' -bind 'set keyseq-timeout 0' - -bind 'set keymap vi-command' -bind 'j:history-search-forward' -bind 'k:history-search-backward' -bind 'set keymap vi-insert' -bind '"\e[A":history-search-backward' -bind '"\e[B":history-search-forward' - -bind 'set show-all-if-ambiguous on' -bind 'set completion-display-width 0' -bind 'set colored-stats on' -bind 'set visible-stats on' - # prompt PS1="\[\033[01m\]\u@\h:\[\e[01;34m\]\w\[\e[37m\]\$\[\e[00m\] " diff --git a/.config/readline/inputrc b/.config/readline/inputrc new file mode 100644 index 0000000..3dc6ce6 --- /dev/null +++ b/.config/readline/inputrc @@ -0,0 +1,22 @@ +$include /etc/inputrc + +set editing-mode vi +set show-mode-in-prompt on +set vi-ins-mode-string \1\e[01;35m\2+\1\e[0m\2 +set vi-cmd-mode-string \1\e[01;34m\2:\1\e[0m\2 +set keyseq-timeout 0 + +set keymap vi-command +j:history-search-forward +k:history-search-backward +"\e[A":history-search-backward +"\e[B":history-search-forward +set keymap vi-insert +"\e[A":history-search-backward +"\e[B":history-search-forward +control-l:clear-screen + +set show-all-if-ambiguous on +set completion-display-width 0 +set colored-stats on +set visible-stats on