4 ms·
Personally, I found the following to be extremely easy and powerful. A no-brainer that should be a bash default really. if [ -t 1 ] then # search for
by whack 10y ago
Personally, I found the following to be extremely easy and powerful. A no-brainer that should be a bash default really.
if [ -t 1 ]
then
# search for commands that start off with the same characters already typed
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
fi
One of my friends also recommended version-controlling your config files and storing them on gitlab, which I'm only sad I didn't do sooner. It's been such a help in keeping my aliases and configs in sync, as I make changes across numerous different machines.
- blockloop 10y agoYou can also put those in your ~/.inputrc
- 3131s 10y agoYes! This is the first thing I do in a new Linux OS. Also, the author does not mention hitting tab for autocomplete (or displaying the remaining options that match what has been typed so far).
- lottin 10y agoThat these, probably the most useful Readline functions by far, are not bound to any keys by default is crazy. To me it makes more sense to bind them to M-p and M-n though.
- joatmon-snoo 10y agoHaving a .dotfiles/ repo makes life so much easier. Seriously.
- mjlangiii 10y agoI'm sorry, can you explain how to use this?
- whack 10y agoJust stick that snippet in your .bashrc file
- antaflos 10y agoA good starting point for versioning dotfiles is https://dotfiles.github.io/ https://dotfiles.github.io/. I like to use Dotbot [1] for managing and installing my dotfiles, but there are plenty of other options listed. [1] https://github.com/anishathalye/dotbot/ https://github.com/anishathalye/dotbot/