Posted Sep 29, 2013 23:07 UTC (Sun) by marcH (subscriber, #57642)
In reply to: 30 years of GNU by jzbiciak
Parent article: 30 years of GNU
> If I type tar zxvf foo[TAB], the over-fancy completion rules won't complete the filename unless it's actually a tar.gz.
"over-fancy"? You are too kind. Whoever spend their time implementing this type of over-crazy stuff should go and find themselves something useful to do.
The only (but significant) superiority of a command line interface over a graphical one is the lack of boundaries: I can enter the most surprising and unusual command and the computer will just do it - no questions asked. bash_completion.d breaks this. bash_completion.d brings the "Cannot find a program to open your file, wanna search the Internet?" type of frustration from the graphical interface world into the command line. A very impressive feat.
The even crazier thing is: how come many distributions enable this by default?
Posted Sep 30, 2013 9:21 UTC (Mon) by gowen (guest, #23914)
[Link]
M-/ is your friend.
You can, of course rebind TAB to complete-filename and skip all the auto-completion. Use "help bind".
It's unfortunate you couldn't find it in the documentation, but its more unfortunate that your response to this was ranting about it on the internet, as if your opinion were the only sane/valid one.
30 years of GNU
Posted Sep 30, 2013 11:36 UTC (Mon) by jzbiciak (✭ supporter ✭, #5246)
[Link]
[I]ts more unfortunate that your response to this was ranting about it on the internet, as if your opinion were the only sane/valid one.
Posted Sep 30, 2013 12:19 UTC (Mon) by gowen (guest, #23914)
[Link]
*chuckles*
Do you think there's a market for t-shirts showing Richard Stallman's face with the phrase "The Dude Abides" underneath?
30 years of GNU
Posted Sep 30, 2013 17:41 UTC (Mon) by Kluge (guest, #2881)
[Link]
Absolutely.
30 years of GNU
Posted Oct 1, 2013 16:50 UTC (Tue) by egoforth (subscriber, #2351)
[Link]
"The GNUde Abides"?
30 years of GNU
Posted Sep 30, 2013 17:58 UTC (Mon) by marcH (subscriber, #57642)
[Link]
> It's unfortunate you couldn't find it in the documentation,
New, "smart" feature; so smart that now you must read documentation before using [TAB]...
You must be having a laugh, right?
30 years of GNU
Posted Sep 30, 2013 15:32 UTC (Mon) by rgmoore (subscriber, #75)
[Link]
I can enter the most surprising and unusual command and the computer will just do it - no questions asked.
Of course that's still true when you use command line completion. All that completion will do is make it easier to enter simple, predictable commands by hitting the TAB button. You can still enter the most surprising and unusual command and the shell will still execute it. You just have to type the whole thing out yourself.
30 years of GNU
Posted Oct 3, 2013 5:01 UTC (Thu) by k8to (subscriber, #15413)
[Link]
I really like the bash completion fu, and I think it is probably better (more convenient) for almost everyone. But it does have awkward corners, and makes using the shell more complicated, so you might be right that it should be off by default.
I certainly didn't mind manually enabling it on Debian.
30 years of GNU
Posted Oct 3, 2013 5:16 UTC (Thu) by gmaxwell (subscriber, #30048)
[Link]
It probably would have been really awesome if it were just on another key instead of replacing the nice deterministic one. I've personally never found it useful, but I could imagine that someone might. My frustration was that I found that it greatly degraded something that was useful to everyone, and resulted in some unwelcome techsupport burden when it hit other people that haven't turned it off yet.
The responses here about using alt-/ to get the explicable behavior back are great. I'm not sure how I ever would have discovered that, since that difference in behavior is not pointed out in the bash man-page.
30 years of GNU
Posted Oct 3, 2013 6:45 UTC (Thu) by k8to (subscriber, #15413)
[Link]
I don't remember how I learned it. I think it might have been in the README.Debian files for the bash completion package that I had to manually install.
bash's command line behavior is a complicated interplay between libreadline and bash and your configfiles. It's pretty hard to learn about in general.
30 years of GNU
Posted Oct 3, 2013 11:15 UTC (Thu) by khim (subscriber, #9252)
[Link]
The responses here about using alt-/ to get the explicable behavior back are great. I'm not sure how I ever would have discovered that, since that difference in behavior is not pointed out in the bash man-page.
Really? That's strange: it's explained here: $ man bash
… complete-filename (M-/)
Attempt filename completion on the text before point.
…
One of the best things WRT GNU project is it's documentation: it's usually pretty well-written. At least user-facing one. Bash is not an exception.
P.S. There are many different way to complete your text in bash: as a filename, as a variable, as a username and so on. And of course TAB always meant “smart completion”. Only usually it was less “smart” than it is today.
30 years of GNU
Posted Oct 4, 2013 22:47 UTC (Fri) by marcH (subscriber, #57642)
[Link]
> And of course TAB always meant “smart completion”. Only usually it was less “smart” than it is today.
Which means it Just Worked.
I did not realize this was called "smart completion". Now I completely understand the connection with Microsoft Word where the very first required is to immediately disable all the so-called "smart" features ("smart" quotes, "smart" initials, "smart" selection,...) in order to be allowed to type anything unusual that Microsoft did not expect.
Exactly the same kind of "smartness".
30 years of GNU
Posted Oct 3, 2013 6:14 UTC (Thu) by jzbiciak (✭ supporter ✭, #5246)
[Link]
I'll be honest. When I first noticed the completion-fu, I was impressed. And most of the time, it does not bother me. But, when it gets in the way of something basic that I think should 'just work,' it incites my 'nerd rage.'
As an architect (both chip and software), I understand the desire to make the on-ramp to working with any particular platform shallower. I /also/ understand the frustration when the 'straightforward, dumb thing' gets usurped by the 'smart, but misapplied thing' (such as my tar example earlier).
I am officially on the fence, truth be told. I grew up with simpler behavior, and find less to complain about with it. The more complex completion.d behavior is definitely very clever, but is also more frustrating at times.