* 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
only message in thread, other threads:[~2019-11-19 19:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20191117184333epcas5p15bc1aa7b0f78182c3d1acc703f55d445@epcas5p1.samsung.com>
[not found] ` <BEBF5AEC-185E-4887-98D7-4731E1D8F7B0@easesoftware.com>
[not found] ` <1574070429.4551.2.camel@samsung.com>
[not found] ` <d64df0bd-0ebb-4f5b-af63-cab62dfbd5fb@www.fastmail.com>
[not found] ` <1574187661.6021.15.camel@samsung.com>
[not found] ` <f11ea64b-8415-4bbc-bd8c-f4d6342ce763@www.fastmail.com>
2019-11-19 19:11 ` P modify in history event Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).