monkinetic weblog | redmonk.net

Since 1999, IX Ed.

GTD vs. the Bash shell

I’ve been doing a major filesystem re-org lately in my ongoing mission to Get More Done. In the spirit of GTD, I created several directories starting with an “@” — @ARCHIVE, @PROJECTS, etc.

All was well and good until I tried to cd @<tab> in the parent directory. Rather than get a directory listing showing me the directories starting with @, it listed available network interfaces:

> cd @
@::1 @broadcasthost @localhost

What the heck? I asked around, and this morning on IRC I got my answer:

tell redmonk that bash thinks you’re typing user@host
use shopt -u hostcomplete to turn that off

Hm…

> shopt -u hostcomplete
> cd @
@ARCHIVE @PROJECTS

W00t! (Thanks to deltab on #swhack for the tip)

Leave a Reply

You must be logged in to post a comment.