From 57f550e1f9337ef3305ff78b6de32c44ff873683 Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Sat, 2 Jul 2016 14:06:10 +0200 Subject: [PATCH] Do not show bash vi-mode --- .config/bash/prompt.bash | 6 +++--- .inputrc | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.config/bash/prompt.bash b/.config/bash/prompt.bash index 85b734a..ffdbf57 100644 --- a/.config/bash/prompt.bash +++ b/.config/bash/prompt.bash @@ -163,7 +163,7 @@ set_prompts() PS1="\[\033]0;\w\007\]" if [[ "$TERM" == *color ]]; then - PS1+=$'\r' # carriage return +# PS1+=$'\r' # carriage return PS1+="\[$userStyle\]\u" # username PS1+="\[$reset$fg\] at " PS1+="\[$hostStyle\]\h" # host @@ -174,14 +174,14 @@ set_prompts() PS1+=$'\n' # newline PS1+="\[$reset$fg\]\$ \[$reset\]" # $ (and reset color) - PS2="\[${yellow}\]→ " # `→` + PS2="\[${yellow}\]-> " PS2+="\[${reset}\]" # reset color else # no colors PS1+=$'\r' # carriage return PS1+="\u at \h in \w on \$(__git_ps1 %s)" PS1+=$'\n''\$ ' # newline and $ - PS2="→ " + PS2="-> " fi export PS1 PS2 diff --git a/.inputrc b/.inputrc index 6911450..b6d3781 100644 --- a/.inputrc +++ b/.inputrc @@ -1,6 +1,7 @@ # Use vi keybindings for everything that uses readline. set editing-mode vi -set show-mode-in-prompt on +# Prompt will be prefixed with a `+` while in insert mode and a `:` when in command mode +#set show-mode-in-prompt on # Adds punctuation as word delimiters set bind-tty-special-chars off @@ -9,7 +10,6 @@ set bind-tty-special-chars off set completion-ignore-case on set show-all-if-ambiguous on set show-all-if-unmodified on -"\es": menu-complete set mark-symlinked-directories on set match-hidden-files off set page-completions on @@ -21,11 +21,11 @@ $if mode=vi set keymap vi-command "gg": beginning-of-history "G": end-of-history - "k": history-search-backward - "j": history-search-forward + "p": history-search-backward + "n": history-search-forward # "\e[C": forward-char # "\e[D": backward-char - + set keymap vi-insert "\C-l": clear-screen "\C-w": backward-kill-word @@ -52,6 +52,8 @@ $if Gdb "\eOR": "stepi\n" $endif +"\es": menu-complete + # Useful stuff for UTF-8 set meta-flag on set input-meta on -- 2.43.0