* Re: P modify in history event
[not found] ` <f11ea64b-8415-4bbc-bd8c-f4d6342ce763@www.fastmail.com>
@ 2019-11-19 19:11 ` Peter Stephenson
0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2019-11-19 19:11 UTC (permalink / raw)
To: zsh-workers
On Tue, 2019-11-19 at 19:03 +0000, Daniel Shahaf wrote:
> Peter Stephenson wrote on Tue, 19 Nov 2019 18:21 +00:00:
> >
> > On Tue, 2019-11-19 at 18:00 +0000, Daniel Shahaf wrote:
> > >
> > > Can «zgetcwd()» return an empty string? If that's possible, the
> > > condition will be undefined behaviour («""[-1]»).
> > Not in a sane world, but there are cases where we can't work out the
> > current directory. I think we return "." then, in fact. But a bit of
> > safety probably wouldn't hurt --- applying [-1] to functions arguably
> > isn't top class style.
> How about this, then?
That looks sensible.
pws
^ permalink raw reply [flat|nested] only message in thread