3 ms·
This looks really nice, especially the colors. As a reminder/heads up, you can often get simple command line editing and completion in tools like psql in a bas
by a3n 12y ago
This looks really nice, especially the colors.
As a reminder/heads up, you can often get simple command line editing and completion in tools like psql in a bash-like environment, just by having a .inputrc file in your home directory. Basically anything that uses readline, like bash, psql, ipython, etc.
Extra benefit, you don't need to set -o vi (or the other flavor) in your .bashrc or on the command line; anything that uses readline (including bash and many other cli interfaces) will read the .inputrc file and do what it says. I'm often pleasantly surprised that a new cli tool uses my .inputrc.
http://linux.die.net/man/3/readline http://linux.die.net/man/3/readline
https://www.gnu.org/software/bash/manual/bashref.html#Command-Line-Editing https://www.gnu.org/software/bash/manual/bashref.html#Comman...
You can easily add the capability to command line tools that you write. For example:
https://docs.python.org/2/library/readline.html https://docs.python.org/2/library/readline.html
- euroclydon 12y ago> you can often get simple command line editing and completion in tools like psql in a bash-like environment, just by having a .inputrc file in your home directory. I'm genuinely confused by this. Why do you need to .inputrc file? Doesn't readline default to EMACS style command shortcuts? And isn't TAB the EMACS (and near universal) key for auto-complete?
- a3n 12y agoIf you like the default behavior, then you don't need .inputrc. If you want vi command line edit keybindings, then you do. Or if you like emacs but you want to customize, then you need a .inputrc.