Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mkdir builtin and $'\0'
- X-seq: zsh-workers 36231
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: mkdir builtin and $'\0'
- Date: Tue, 18 Aug 2015 17:20:40 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=d2k0VDWwaRWeEmInlC57t0nsZYDGDttLAaUnTHUUsCo=; b=opb0AKrIayRzF4E+i+mU+65K2eU154q1XKW7LeiKHY9+iTPATQm2IsVUH3exj7JMNY qzuClz8VEUDBl5GADvnWh+SPtsfUS/eOox+nzPo6WHt11LgIZo8X48T/D5AETXHFnvzE /mB5B5XsD2IPadco/L1OhDcdWZlA2dDp0YLmnpdiPzgIlYdEfh7FLL2vF4xCYByduBHP oC2GkYWQ29/A24rzq62cht9AZeebC2CkL1ChKk2Gh4yIiAIul4JGjMh7elp+qfYb3Thq Yd0lZihIzKRVkXh/DVVDm0PxgLH1ld9GFbASAF2ZGAWYHCnGW86RvshlKN7SBdcjrLrW bjvQ==
- In-reply-to: <20150818091904.GA5389@chaz.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150818091904.GA5389@chaz.gmail.com>
2015-08-18 10:19:04 +0100, Stephane Chazelas:
[...]
> A bit worse:
>
> $ strace -e chdir zsh -c "cd $'a\0b'; print -r -- \$PWD; pwd"
> chdir("/export/home/stephane/a") = -1 ENOENT (No such file or directory)
> chdir("a\203 b") = 0
> chdir("..") = 0
> chdir("..") = 0
> chdir("..") = 0
> chdir("/home/stephane/a\203 b") = 0
> /export/home/stephane/a
> /home/stephane/a� b
> +++ exited with 0 +++
>
> I suppose the chdir("..")s come after the realisation that $PWD
> probably doesn't represent the current directory anymore (since
> chdir("$PWD/dir") doesn't work while chdir("dir") does).
[...]
How about my "cd" case?
The discrepancy between $PWD and pwd is strange there.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author