Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: expansion after =?



In the last episode (Jul 02), Seth Kurtzberg said:
> Hello list,
> 
> Is there a configuration parameter or option that enables path
> completion after equals, for example, export ENVVAR=/some/path/name? 
> I've been using zsh for some months now, and this is the only thing
> that bash does that I find missing in zsh.  But perhaps the behavior
> can be turned on in some way?

Try two equals signs, one for the assignment, and one for path
expansion.

dan% PAGER==less
dan% echo $PAGER
/usr/bin/less
dan%

It's documented under FILENAME EXPANSION:

       If  a  word  begins  with  an  unquoted `=' and the EQUALS
       option is set, the remainder of the word is taken  as  the
       name  of  a command or alias.  If a command exists by that
       name, the word is replaced by the  full  pathname  of  the
       command.   If  an  alias  exists by that name, the word is
       replaced with the text of the alias.

I didn't even know bash could do path expansion.

-- 
	Dan Nelson
	dnelson@xxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author