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

Re: [PATCH v2 2/3] Fix the ':A' word modifier on paths with '..' components.



On Jul 1,  5:11am, Daniel Shahaf wrote:
} Subject: Re: [PATCH v2 2/3] Fix the ':A' word modifier on paths with '..' 
}
} What's the use-case for the "resolve '..' before symlinks" behaviour?
} 
} Was it an intentional design feature, or simply a documented bug?
} (Honest question.)

PWS will have to weigh in on that one.  The use-case may simply have
been the intention to make :A a superset of :a.

} (Perhaps instead of a new option, a new syntax; e.g., have $foo:A retain
} its meaning and $foo:A:A have the new meaning.  Or make :A take an
} optional argument.)

Not ideal IMO because either would make :A differ from all other history
modifiers in this respect.  I.e. :A:A should mean to resolve to real
path and then resolve to real path again, like :h:h means to chop two
elements off the tail (and thus the second :A should be a no-op like
repeating :t); and no other has an optional argument.  However, worth
considering.

Sorry to just sort of leave things there.  I don't have a strong
objection to changing the :A default given the :a:A equivalence, and
that seems the least confusing final outcome if we conclude that the
likelihood of breaking scripts is small, but I would like to reach a
consensus decision.



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