LWN.net Logo

30 years of GNU

30 years of GNU

Posted Sep 30, 2013 0:02 UTC (Mon) by Richard_J_Neill (subscriber, #23093)
In reply to: 30 years of GNU by jzbiciak
Parent article: 30 years of GNU

> That one drives me nuts, personally. For example, suppose I download a
> compressed tarball, not noticing if it's foo.tar.gz, foo.tar.bz2, or
> foo.tar.xz. If I type tar zxvf foo[TAB], the over-fancy completion rules
> won't complete the filename unless it's actually a tar.gz.

Use Alt+/ to force completion, if "smart" completion fails.

The other trick is to add to /etc/inputrc:
set show-all-if-ambiguous on

Two really useful cases for tab completion are with the package-manager:
apt-get install libfoo[TAB]
and with SCP (if you have ssh keys):
scp remote_host:filen..[TAB]


(Log in to post comments)

30 years of GNU

Posted Sep 30, 2013 11:44 UTC (Mon) by cortana (subscriber, #24596) [Link]

> Use Alt+/ to force completion, if "smart" completion fails.

Sorry for the low-content post but... THANK YOU SO MUCH FOR THIS!

completion

Posted Sep 30, 2013 12:53 UTC (Mon) by tialaramex (subscriber, #21167) [Link]

scp completion is rather dangerous, here's how:

1. Set a remote machine to disable SSH connections from hosts which pester with invalid credentials because maybe they're "script kiddies"

2. Change the credentials somewhere

3. Try to use SCP completion. Whack tab a few times wondering why it's not working

4. Congratulations you are now locked out of the remote machine with no clue as to what happened.

A systems administrator we hired locked himself out of his home systems this way, very amusing.

completion

Posted Oct 3, 2013 5:07 UTC (Thu) by k8to (subscriber, #15413) [Link]

I'm not a fan of log-into-remote-systems-on-tab-complete for sure. If nothing else, it introduces *crazy* latency into tab completion, which isn't really very pleasant.

As for the script-kiddy lockout, the sane thing to do is expire that kind of thing after some time interval, possibly progressive, so that once you realized you screwed up you just wait 30 minutes and can get back in.

If one is so dense as to keep spamming it over and over for over 30 minutes, well... maybe the lockout could work to teach one lessons in patience and care. :-D I know a younger me could probably have used them.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds