Say I have a folder with files in it with names like this:
log_1.log
log_2.log
log_2.gz
And I want to perform some operation, let's say move, on log_2.gz.
In Windows cmd.exe, I am used to performing these steps:
move
(and nothing else) log_2.gz
destination
But in bash shell (within iTerm2 on Mac OS X 10.8.3), I have to do something like this:
mv l
log_
and makes an annoying beep sound2
log_2.
and makes an annoying beep soundg
log_2.gz
and is satisfyingly silentdestination
As you can see, bash requires many more steps even when you know the destination filename, but imagine a scenario where you are not really certain what exactly is in the filename (maybe the ls
was too long). I often find myself in this scenario after a few tab + typing and am forced to abandon the command, run ls
again, copy the filename, maybe even run a pwd
to concatenate with the folder, and then resume where I left off. This is very annoying.
You can add the following in your .inputrc
(if you don't have one, then create it) file. Once added, either source the file or logout and log back in.
set show-all-if-ambiguous on
set completion-ignore-case on
TAB: menu-complete
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With