zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-users@zsh.org
Subject: Re: Absolute path of a path
Date: Thu, 28 Oct 2010 12:44:51 +0200	[thread overview]
Message-ID: <20101028104451.GB19471@prunille.vinc17.org> (raw)
In-Reply-To: <AANLkTinLOXXBT=Wsu+gKLSEMgGGPg33c+_93CyS6xLsG@mail.gmail.com>

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 ".".

-- 
Vincent Lefèvre <vincent@vinc17.net> - 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)


  reply	other threads:[~2010-10-28 10:45 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 [this message]
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
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=20101028104451.GB19471@prunille.vinc17.org \
    --to=vincent@vinc17.net \
    --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).