Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Absolute path of a path
- X-seq: zsh-users 15518
- From: JÃrÃmie Roquet <arkanosis@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Absolute path of a path
- Date: Thu, 28 Oct 2010 14:19:54 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=8wnTZDjN2GqgCH9TQ/y4l2rCxyBGYiJAGlTfbt4Z2Yg=; b=bYNEXGyKy5gsajRuSEjrVFMXfm3WXpHjFFxdA1e0qAhnzZyGKGwitFgNvSNvBG+fig WE3eCFvimKiIDcUS7AVEFKonP8R43w9iwVHElMYwPtt61PI8ClJkZOgSv7nkHbAtWYvo NPdBia1WCEN59W6Ewm1b8C6eZ6LxMDBneLJfg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=KXDswTKZx/BJPmzKqqFOzfmCsan+0uEdGbdyQbc7a/wOZkbwR1RqyBlM77oHCmyEv2 byYPCM55LPJKwrdIkmX2UZGn1YWJLGDIVPlAYx1gWRvFcUTG9eYay6zVIPq55taoiD9W Ro5IBulNQXL4QB9c14WFmkXcxc27esBNStxiE=
- In-reply-to: <20101028104451.GB19471@xxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- 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> <20101028104451.GB19471@xxxxxxxxxxxxxxxxxxx>
2010/10/28 Vincent Lefevre <vincent@xxxxxxxxxx>:
> 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 ".".
Strange, it works for me.
$ pwd
/udir/jroquet
$ ls -l .screenrc
lrwxrwxrwx 1 jroquet kmem 37 2009-10-16 14:56 .screenrc ->
/udir/jroquet/Arkonf/screen/.screenrc
$ ls -l .screenrc(:A)
-rw-r--r-- 1 jroquet kmem 1521 2010-02-24 18:44
/udir/jroquet/Arkonf/screen/.screenrc
$ echo .screenrc(:A)
/udir/jroquet/Arkonf/screen/.screenrc
I'm running Ubuntu Linux 10.04, zsh 4.3.10
--
JÃrÃmie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author