3 ms·
I wrote a shell toy to help me learn vim motions.. the idea is you can grab parts of the output of previous shell commands by passing vim motions. So like when
by bgribble 10y ago
I wrote a shell toy to help me learn vim motions.. the idea is you can grab parts of the output of previous shell commands by passing vim motions. So like when you want to say "git checkout <that branch mentioned 5 lines up in the previous command's output>" you can do it :)
git checkout $(lw 5kyiW)
It's more of a toy than a power tool but I do use it somewhat regularly.
https://github.com/bgribble/lw https://github.com/bgribble/lw
- ifoundthetao 10y agoInteresting, you may be interested in vi mode in bash. http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/ http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-shee...
- amboar 10y agoFor bash or any other application using the readline library you can configure it for vi mode by adding 'set editing-mode vi' to your ~/.inputrc. Note for bash you can instead add 'set -o vi' to ~/.bashrc to avoid setting the mode for all readline applications