Restricted tab-completion is annoying

Aaron C. de Bruyn ubuntu-devel-discuss at darkpixel.com
Thu Oct 11 15:23:38 UTC 2007


> you can of course modify tab-completion by
> modifying /etc/bash_completion and the files in /etc/bash_completion.d
> that might be what you want to do.

If I modify them, doesn't that mean they will get overwritten by the next update to the bash package?

> there are lots and lots of reasons to have program-specific
> tab-completion.  for instance, having acroread complete only .pdf files
> means that the small number of pdf's in my home directory are easy to
> find when i start acroread.

I know the reasons for program-specific tab completion--I love it with svn, but it is annoying when you are trying to tab-complete a filename and it won't do it because the file doesn't end with PDF or pdf for example.

To me it seems like this is heading down the windows route.  Give all your file names a 3 character extension so you know what to open it with.
Shouldn't it be more 'unixy' and be based on the mime-type of the file?

I know that would be a major pain implementation-wise, because your tab-completion would then have to figure out the mime type for every file that matches, slowing things down a bit...

This user-friendly restrictedness should be in the GUI.  (I just checked, and gnome shows my file as a PDF no matter what extension it has.)

I maintain that the bash prompt is not supposed to be a user-friendly environment.  It's the bash prompt afterall.  It's where admins, power-users, and all-around geeks can go to do advanced stuff.

I don't think it's a good argument to say that people need to have user-friendly hand-holding at the command prompt.  If I want to run 'evince somefile.asp' I should be able to.  I don't care if the extension is .asp .pdf or .mystupidfile.

Anyways--that's my .02, and thanks to Gavin and his message, I can always run 'shopt -u progcomp' in my .bashrc if everyone else thinks it's a good idea to keep it.

-A





More information about the Ubuntu-devel-discuss mailing list