From 212333187dfbd60b29f94b91c167145c2c57ebb2 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Wed, 18 Dec 2019 18:04:54 -0800 Subject: [PATCH] Add inputrc and bash bind --- README.md | 2 ++ dotfiles/bash/bashrc | 9 +++++---- dotfiles/bash/inputrc | 5 +++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 dotfiles/bash/inputrc diff --git a/README.md b/README.md index 22ec64e..24cc663 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ For Linux, symlink `scripts/dotfiles/bash/linuxrc` to `~/.linuxrc`. If you want better tab completion install `bash-completion` using your package manager. +Symlink `scripts/dotfiles/bash/inputrc` to `~/.inputrc`. + ## Vim Right now I use Neovim. diff --git a/dotfiles/bash/bashrc b/dotfiles/bash/bashrc index a89db03..e60b812 100644 --- a/dotfiles/bash/bashrc +++ b/dotfiles/bash/bashrc @@ -1,10 +1,11 @@ # Use the iterm2 material theme in the root directory of the essentials repository. For linux, # you will need to source a material theme color scheme for your terminal. -# Improve autocomplete -bind "TAB:menu-complete" -bind "set show-all-if-ambiguous on" -bind "set menu-complete-display-prefix on" +if [ -f ~/.inputrc ]; then + bind -f ~/.inputrc +else + echo "No .inputrc detected" +fi if [[ "$OSTYPE" == "darwin"* ]]; then if [ -f ~/.macrc ]; then diff --git a/dotfiles/bash/inputrc b/dotfiles/bash/inputrc new file mode 100644 index 0000000..6b32efb --- /dev/null +++ b/dotfiles/bash/inputrc @@ -0,0 +1,5 @@ +set show-all-if-ambiguous on +set show-all-if-unmodified on +set menu-complete-display-prefix on +"\t": menu-complete +"\e[Z": menu-complete-backward