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

Re: Next release (5.3)



On Wed, 13 Jul 2016 09:35:35 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jul 13, 10:59am, Peter Stephenson wrote:
> }
> } Here's a script that's broken by the change.
> 
> Here's a question:  Of what significance is the use of :A in this case,
> as opposed to :a ?  That is, why use :A at all here?  Can you come up
> with an example where :a and :A differ that would still be broken by
> the change?

As there are no additional symbolic links in this case, there's no
difference.

Why use :A --- for exactly the same reason you'd ever use it, that you
want the physical path for later reference rather than one that still
has symbolic links in it.  Why you'd do *that* is a vaguer question: you
might believe that the symbolic link was temporary and the physical
path not (which doesn't reflect the situtation I've got here in the
example).

The result would differ if you had a symbolic link higher up, e.g. if my
home directory was a symbolic link (from an automounter, for example),
which would be resolved in one case but not the other.  But the question
why I'd *want* that is still open; I think we're back in the woolly
world of intention that's somewhat bedevilled this discussion.

> } # No CHASE_*.
> } emulate zsh
> } 
> } # We know :A resolves using the same rules as directory changing,
> } # so use that.
> } resolved=($file(:A))
> } print "\nUsing $file with :A => $resolved"
> } cat $resolved
> 
> I don't want this discussion to become circular, but don't the comments
> there imply that what's desired/intended is for :A to respect CHASE_*?

Indeed, that was one of the things in my mind, although whether it's the
right fix is another matter.

pws



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