[Pkg-zsh-devel] Bug#607615: zsh: Behavior of ":A" and ":a" isn't clear and seems wrong
Daniel Shahaf
danielsh at apache.org
Fri Jun 10 17:42:53 UTC 2016
Control: found -1 5.2-dev-1-1
I just submitted a patch upstream:
From: Daniel Shahaf <d.s at daniel.shahaf.name>
To: zsh-workers at zsh.org
Subject: [PATCH 2/3] Fix the ':A' word modifier on paths with '..' components.
Date: Fri, 10 Jun 2016 17:36:23 +0000
Message-Id: <1465580184-3095-2-git-send-email-danielsh at tarsus.local2>
(sorry, no X-Seq yet)
Daniel
Vincent Lefevre wrote on Mon, Dec 20, 2010 at 11:17:05 +0100:
> d=$PWD:t
> ln -s . symlink-to-dot || exit 1
> realpath symlink-to-dot/../$d/symlink-to-dot
> realpath symlink-to-dot/../$d/does-not-exist
> echo symlink-to-dot/../$d/symlink-to-dot(:A)
> echo symlink-to-dot/../$d/does-not-exist(:A)
> echo symlink-to-dot/../$d/symlink-to-dot(:a)
> echo symlink-to-dot/../$d/does-not-exist(:a)
> rm symlink-to-dot
>
Vincent Lefevre wrote on Mon, Dec 09, 2013 at 11:03:03 +0100:
> Here's another test:
>
> $ pwd
> /home/vlefevre
> $ ln -s dir1/dir2 foo
> $ echo OK > file
> $ cat foo/../../file
> OK
> $ realpath foo/../../file
> /home/vlefevre/file
> $ echo ${$(echo foo/../../file):a}
> /home/file
> $ echo ${$(echo foo/../../file):A}
> /home/file
More information about the Pkg-zsh-devel
mailing list