Skip to content

Instantly share code, notes, and snippets.

@dschep
Last active August 29, 2015 14:15
Show Gist options
  • Save dschep/dd9cf12434532252741b to your computer and use it in GitHub Desktop.
Save dschep/dd9cf12434532252741b to your computer and use it in GitHub Desktop.
Quick Vi mode for Bash & Readline, with superminimal PS1
set -o vi
bind -m vi-insert "\C-l":clear-screen
PS1='[\u@\h:\W] \$ ' # plain & static liquidprompt-esque prompt
set editing-mode vi
set keymap vi-insert
"\C-l": clear-screen # CTRL-L
set keymap vi-command
#!/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
@dschep
Copy link
Author

dschep commented Feb 10, 2015

Easy install with:

curl https://gist.githubusercontent.com/dschep/dd9cf12434532252741b/raw/setup.sh | bash

or

wget -qO- https://gist.githubusercontent.com/dschep/dd9cf12434532252741b/raw/setup.sh | bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment