How to survive with vi commands in someone else's Bash session

12 Sep 2015

This will set your Bash session to use vi commands:

$ set -o vi

This will tell programs that use libreadline to use vi editing mode, without disturbing the ~/.inputrc of the native user:

$ cat "set editing-mode vi" > /somedir/vi-inputrc
$ export INPUTRC=/somedir/vi-inputrc