On Wed 17 November 2004 16:57, Rhugga wrote:
I noticed something with the bash shell recently (might be old and just never really noticed it before)
If I have 3 files in a directory, such as follows:
file_1.tar file_2.tar file_3.tar.gz
If I type 'gzip -df file' and then hit TAB to start path completion, it knows to select the file_3.tar.gz because it is the only file with a *.gz extension. (I am assuming) Just curious where this new functionality was implemented. Is this done to bash itself or via some other mechanism?
I am looking to do something like this for some code I am writing...
Thx, cc
Take a look in: /etc/profile.d/complete.bash Also, try 'man bash' and search for 'completion' for the rules that are used to complete a word. HTH jalal -- GPG fingerprint = 3D45 5509 D380 26A4 523E A9D8 A66A 5F38 CA43 BB0E