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

Re: [contrib] fish-like directory in prompt



On Sat, Feb 28, 2009 at 12:57:30PM +0100, derf@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> it can also produce "tab-safe" paths, so if you take the path, paste
> it into a shell and press tab, it will safely expand to your current
> working directory.

Nice!  I encountered one issue if the path uses a symlink as a directory
component:  either the full symlink name is always included (if the
symlink is the only matching item with the starting letter), or not
enough path is output (if some other directory starts with the same
letter as the symlink).  The solution is to turn on symlink-following
for the glob:

- 			expn=($(echo ${part}*(/)))
+ 			expn=($(echo ${part}*(-/)))

..wayne..



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