From: "Jérémie Roquet" <arkanosis@gmail.com>
To: zsh-users@zsh.org
Subject: Re: Absolute path of a path
Date: Thu, 28 Oct 2010 14:19:54 +0200 [thread overview]
Message-ID: <AANLkTikpxuE0V2YjWFELabCrfrSOKegnRaoEGKZTK0Nh@mail.gmail.com> (raw)
In-Reply-To: <20101028104451.GB19471@prunille.vinc17.org>
2010/10/28 Vincent Lefevre <vincent@vinc17.net>:
> On 2010-10-27 18:54:17 +0200, Jérémie Roquet wrote:
>> 2010/10/27 Vincent Lefevre <vincent@vinc17.net>:
>> > 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
next prev parent reply other threads:[~2010-10-28 12:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 9:25 Nikolai Weibull
2010-10-27 9:34 ` Jérémie Roquet
2010-10-27 9:37 ` Nikolai Weibull
2010-10-27 16:44 ` Vincent Lefevre
2010-10-27 16:54 ` Jérémie Roquet
2010-10-28 10:44 ` Vincent Lefevre
2010-10-28 10:46 ` Vincent Lefevre
2010-10-28 10:52 ` Vincent Lefevre
2010-12-20 10:26 ` Vincent Lefevre
2010-12-20 14:44 ` Peter Stephenson
2010-12-25 14:43 ` Vincent Lefevre
2010-10-28 12:19 ` Jérémie Roquet [this message]
2010-10-28 13:17 ` Vincent Lefevre
2010-10-28 12:45 ` Benjamin R. Haskell
2010-10-27 16:54 ` Mikael Magnusson
2010-10-27 16:57 ` Benjamin R. Haskell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikpxuE0V2YjWFELabCrfrSOKegnRaoEGKZTK0Nh@mail.gmail.com \
--to=arkanosis@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).