3 ms·
I'm glad you like ZSH, for those wondering if you can do similar things in Bash (lots of non technical folks on the site these days). * I have to admit I tend
by jdhendrickson 5y ago
I'm glad you like ZSH, for those wondering if you can do similar things in Bash (lots of non technical folks on the site these days).
* I have to admit I tend to run mlocate on my systems and grep for full file paths instead of using tab completion if I don't know what the directory path is. However if you want auto complete with a list to pick from like ZSH
bind 'set show-all-if-ambiguous on'
bind 'TAB:menu-complete'
in your inputrc will do the trick.
* echo set completion-ignore-case on | sudo tee -a /etc/inputrc
(use .bashrc instead of input if you only want to set this for your own user)
* ctrl + r type part of your command history search in bash
* alias gcam='git commit -a -m'
ZSH definitely has a lot of cool things (globbing is really nice for instance), but Bash is ubiquitous and it's good to know how to make your life easier if you are working on a server that doesn't have your fave shell installed.
Happy hacking!
When I started typing this there were no replies, I got distracted by a work slack, and came back to hit submit, and there are two basically duplicates. An excellent reminder that none of us are actually the main character so to speak.
- arp242 5y agoControl+r is search and not quite the same, since it matches everywhere rather than just at the start (maybe there's a way to do it, but I never liked the way C-r behaved in the first place so I never checked). However, you can use "history-search-backward" (and -forward) in your inputrc to get it.