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

Re: expansion of environment variables



On Mar 5, 11:35am, ruud grosmann wrote:
}
} The new version has a feature that is not in the 3.0 version. I would
} like to disable the feature, but I am not sure if an option exist for
} that one. Maybe you can help me.

I don't know why this would have changed, but it does not appear that
there is any way to turn it off.  Both the expand-or-complete and the
complete-word widgets expand the variable; I would have expected the
latter not to.

Worse, if I enable the new completion system with 'compinit' then the
variable doesn't expand but the completion doesn't work.  I mention
this because with the new completion system enabled, the 'suffix'
zstyle is supposed to control exactly what Ruud is asking about, and
the default is to have the "old" behavior that he wants.
 
For benefit of zsh-workers, with compinit this is yet another problem
in _path_files.  At line 479 (latest CVS) it correctly assigns the
expanded list of files to the tmp2 array (having originally gotten
them from "compadd -D tmp1" at line 466), but then when building the
exppaths array at lines 484 or 486, it uses ${tpre}${tsuf} which have
never been expanded.

I'm also not sure how line 484 can ever be reached, since at 479
"${(@)tmp2:h}" is always going to strip off any trailing slash.  It
seems a bit strange to compare an entire array to a single pattern
at line 483 as well, but I guess it works since the last element of
the array should be representative of any single element.



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