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

Can this snippet be further improved?



I'm preparing update to zsh plugin standard. It's about getting the
path to the sourced (….plugin.zsh) script. The current version is:

    0=${${ZERO:-${(%):-%x}}:A}

I wonder if it could be improved? The current version:
- favors ZERO,
- falls back to %x if ZERO is empty,
- makes the path absolute,
- resolved symlinks and ,,./ components.

Is there a bug or improvement that's possible?

-- 
Best regards,
Sebastian Gniazdowski




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