Bash programmable completion of variable names

Hal Burgiss hal at burgiss.net
Mon Jun 22 18:15:08 UTC 2009


On Mon, Jun 22, 2009 at 07:25:52PM +0200, PleegWat wrote:

> I'm not quite able to reproduce either behaviour. Does a file/directory 
> whose name starts with '$c' exist in the current working directory, or 
> is CDPATH set and does a directory with such name exist in a directory 
> in CDPATH?

Nice try, but no go.

Well, bash completion (if enabled) is capable of expanding all kinds of
things, including declared variables, hostnames, etc. Quite handy. Ubuntu may
have this off, I can't remember. If so, its commented out in the stock
/etc/bash.bashrc IIRC. 

-- 
Hal




More information about the ubuntu-users mailing list