One thing I’ve found useful is ctrl+x ctrl+e to edit the current command in $EDITOR. That way I can leave the emacs-style keybindings at the shell, as you’ll find that everywhere, but you can still edit unwieldy commands in real vim.
In some situations (such as the set operations or uniqueness operations below) you can safely ignore slow i18n routines entirely and use traditional byte-based sort order, using export LC_ALL=C.
Be very careful if you do this. I highly recommend you don’t export it and instead use it as the environment for a single command.
LC_ALL=C sort blah
If you export it, you’ll likely to forget that you did and you’ll run into all kinds of trouble.
Well, today I learned that
set -o viis going into all my.bashrc’s from now on.One thing I’ve found useful is
ctrl+x ctrl+eto edit the current command in$EDITOR. That way I can leave the emacs-style keybindings at the shell, as you’ll find that everywhere, but you can still edit unwieldy commands in real vim.Best part: Bash has it by default.
Or, in your
/etc/inputrcor~/.inputrc:Be very careful if you do this. I highly recommend you don’t
exportit and instead use it as the environment for a single command.If you
exportit, you’ll likely to forget that you did and you’ll run into all kinds of trouble.