Subject: Re: [PATCH] New :P history modifier.
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Wed, 17 Aug 2016 10:06:14 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Aug 17,  4:31pm, Daniel Shahaf wrote:
}
} - xsymlink() is not a drop-in replacement: it tolerates trailing
}   non-existing path components.  The single callsite in current master
}   wouldn't care, though.

Pretty much my point; if there's only one call and they're equivalent
for that instance, why leave the special case?
 
} > Picking at the docs ...
} > 
} > Given that we went to the trouble of hashing it out, it is probably
} > worth noting that :a is intended to result in the path to along which
} > "cd" would change under the default setopts (no_chase_dots),
} 
} 38945 made such a change; do you think further changes are needed?

Nah, that's probably good enough.

} > } +	"a:absolute path, resolve '..' logically"
} > } +	"A:same, then resolve symlinks"
} > } +	"P:realpath, resolve '..' physically"
} > 
} > I'm not sure "logical" and "physical"

"lexical" and "physical" are probably good enough, given the mnemonic
helpfulness (P -> physical, a -> absolute).

} >  The new word modifier ':P' computes the physical path of the argument.
} >  it is different from the existing ':a' modifier which does always
} >  resolves /before/here/../after to /before/after, and differs from the
} >  existing ':A' modifier which resolves symlinks only after here/.. is
} >  removed even when /before/here is itself a symbolic link.
} 
} What about the "It is recommended [to audit uses of :A and change them
} to :P]" sentence that the original patch had, should it be kept or
} removed?

IMO it can be kept.

-- 
Barton E. Schaefer