I've been trying to find this for a couple of days now and while I am aware that I can write a bash function to get it the way I want, I am sure that this option comes out of the box.
I have recently upgraded to RHEL 7.11 and in previous RHEL versions when using double tab it would display a numbered menu when I had ambiguous options.
Consider this, I have a directory with the following files:
abc abcd abcde abcdef abcdefg abcdefgh abcdefghi
So when I type:
cat abc [tab][tab]
And there were multiple matches, I would get:
1) abc
2) abcd
3) abcde
4) abcdef
5) abcdefg
6) abcdefgh
7) abcdefghi
Subsequently I could type '7' and [tab] and it would concatenate the file at the option 7).
This is super useful when there are a lot of similar options with many files starting with the same characters (as is the case on my server where file names are preceded with system names for clarity).
Any ideas?
When at the MS-DOS, Windows command line or a Linux or Unix shell, typing in long file names or directories can become a burden. Use the Tab to autocomplete the names of directories and files while in the command line.
file. to enter the *edit* mode and type any JavaScript keyword in the text editor and press *Ctrl + x* followed by *Ctrl + o*. Vim editor will show the possible auto-complete suggestions.
I recommend https://github.com/junegunn/fzf, I started to replace all my in-shell menu choices with this GREAT tool.
It has bash support, batteries included.
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