Last active
August 29, 2015 14:15
-
-
Save dschep/dd9cf12434532252741b to your computer and use it in GitHub Desktop.
Quick Vi mode for Bash & Readline, with superminimal PS1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -o vi | |
bind -m vi-insert "\C-l":clear-screen | |
PS1='[\u@\h:\W] \$ ' # plain & static liquidprompt-esque prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set editing-mode vi | |
set keymap vi-insert | |
"\C-l": clear-screen # CTRL-L | |
set keymap vi-command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GIST_ID=dschep/dd9cf12434532252741b | |
if type -p curl &> /dev/null; then | |
function _get () { curl -kLO "$1"; } | |
elif type -p wget &> /dev/null; then | |
function _get () { wget "$1"; } | |
else | |
function _get () { echo "cannot find curl or wget!"; exit 1; } | |
fi | |
[ -f bashrc ] || _get https://gist.github.com/$GIST_ID/raw/bashrc | |
[ -f inputrc ] || _get https://gist.github.com/$GIST_ID/raw/inputrc | |
cp bashrc ~/.bashrc | |
cp inputrc ~/.inputrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Easy install with:
or