From c3cebe75b413ceda0fc7617410dd509bc9f31cab Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Wed, 27 Mar 2024 01:54:59 +0300 Subject: [PATCH] Shopt : Change bar on input. --- module/common/bash/module/Shopt.sh | 23 ++++++++++++++++++++++- module/common/bash/module/Watch.sh | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/module/common/bash/module/Shopt.sh b/module/common/bash/module/Shopt.sh index 7f1c1be..2bbaede 100644 --- a/module/common/bash/module/Shopt.sh +++ b/module/common/bash/module/Shopt.sh @@ -2,6 +2,27 @@ shopt -s dotglob shopt -s globstar shopt -s autocd shopt -s extglob -set -o vi + +#################### VIM #################### +# FOR MORE INFORMATION CHECK: +# https://wiki.archlinux.org/index.php/Readline + +# TURN ON VIM (E.G. FOR READLINE) +bind 'set editing-mode vi' + +# SHOW THE VIM MODE IN THE PROMPT (COMMAND OR INSERT) +bind 'set show-mode-in-prompt on' + +# SET THE MODE STRING AND CURSOR TO INDICATE THE VIM MODE +# FOR THE NUMBER AFTER `\e[`: +# 0: blinking block +# 1: blinking block (default) +# 2: steady block +# 3: blinking underline +# 4: steady underline +# 5: blinking bar (xterm) +# 6: steady bar (xterm) +bind 'set vi-ins-mode-string \1\e[6 q\2' +bind 'set vi-cmd-mode-string \1\e[2 q\2' exec {BASH_XTRACEFD}>/dev/null diff --git a/module/common/bash/module/Watch.sh b/module/common/bash/module/Watch.sh index ee86854..1734791 100644 --- a/module/common/bash/module/Watch.sh +++ b/module/common/bash/module/Watch.sh @@ -20,5 +20,5 @@ function ww() { watch -n 0 "${@}" } -# autocomplete. +# Autocomplete. complete -F _autocomplete_nested w ww