Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Absolute path of a path
- X-seq: zsh-users 15514
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Absolute path of a path
- Date: Thu, 28 Oct 2010 12:44:51 +0200
- In-reply-to: <AANLkTinLOXXBT=Wsu+gKLSEMgGGPg33c+_93CyS6xLsG@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <AANLkTikZN2Lk3zf2fWqD917TA-Wa5jCBQSZ-7VNWVOCj@xxxxxxxxxxxxxx> <AANLkTi=j_OtAziY1X=1qj=zk3P7=U6my1sd=bVshp69u@xxxxxxxxxxxxxx> <20101027164454.GA19471@xxxxxxxxxxxxxxxxxxx> <AANLkTinLOXXBT=Wsu+gKLSEMgGGPg33c+_93CyS6xLsG@xxxxxxxxxxxxxx>
On 2010-10-27 18:54:17 +0200, JÃrÃmie Roquet wrote:
> 2010/10/27 Vincent Lefevre <vincent@xxxxxxxxxx>:
> > BTW, is there a way to get the canonicalised absolute pathname
> > with zsh? (i.e. what the "realpath" command gives.)
>
> your_path(:A) I guess :)
No. The zsh man path says:
A As `a', but also resolve use of symbolic links where possible.
Note that resolution of `..' occurs before resolution of symâ
bolic links. This call is equivalent to a unless your system
has the realpath system call (modern systems do).
but Linux doesn't have a realpath system call.
ypig:~> man 2 realpath
No manual entry for realpath in section 2
FYI:
ypig:~> realpath symlink/../vlefevre/symlink
/home/vlefevre
ypig:~> echo symlink/../vlefevre/symlink(:A)
/home/vlefevre/vlefevre/symlink
where symlink is a symbolic link to ".".
--
Vincent LefÃvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / ArÃnaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author