On Sunday 22 May 2005 15:42, Randall R Schulz wrote:
Yes, but... If you don't explicitly include the z flag, then command completion, which knows better, won't complete on a file name ending in .gz.
Hm, yes, that is annoying. A little editing of /etc/bash_completion will fix it though. Just change it to +([^IZzjy])f) ext='t?(ar.)@(gz|Z|bz?(2))' regex=$ext ;;
For the most part, all the command-completion fanciness that obviously took a lot of painstaking configuration (being dependent on the syntax of a lot of well-known commands) is very convenient (and I miss it at work on RHEL 3),
You could just copy the script /etc/bash_completion and put it in your home directory and have it sourced by .bashrc
but then there are just enough gaps and errors to make it frustrating, on occasion.
This is true, the defaults can be annoying at times, when they are too insistent on working by filenames and refuse to complete on anything that doesn't have the correct extension. But bash_competion is moderately easy to modify to suit your needs