Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
$PWD and ~+ (and others) in documentation
- X-seq: zsh-workers 28283
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: $PWD and ~+ (and others) in documentation
- Date: Tue, 21 Sep 2010 17:48:41 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=M+mciiFm6EoMuEMtdRbSuIf+QTn9QOqGMrKlxBysDiQ=; b=GyUV6ICBVLM58i2mTy7kMOisZhp+/it0zdXrrEUjJ8kYXr+LQEK6xug++bnAMiH7nD KCs9rJGkEK5eK1rO8fSEuNnss/UaaoRFC1yxz9wCPq5TNOdlj3YWn2BHiRRQvhd3eNsL 4/uZBJz6P2ebUR6272NY13RJLC8sYBKFfgZG0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Jgt1YDxSere8PW3aHRqs+5L93mk3rNWroHJXsjZgI/vaeK5lGZPZT1ujtlqoGtHf4p JpvAjgxo6fFuBhGG2ij29KGLNoHza27B2l+Ju3kQMqVx5fCIt9sQD1tPSmY5kJc9FM17 Sr1s2dyPC+0uadWXF4IURGPlOfQOh8bUgdymY=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
I noticed that PWD can be assigned to, and found a thread from 98
where it was discussed a bit. Apparently some scripts like to assign
to it and they were broken under zsh. The "problem" is that the
documentation says things like
%/ Present working directory ($PWD). If an integer follows
the `%', it
specifies a number of trailing components of $PWD to
show; zero means
the whole path. A negative integer specifies leading
components, i.e.
%-1d specifies the first component.
However, after PWD has been assigned to, %/ still shows the actual
current directory, not the value of $PWD. The same applies to ~+, ~-
(and $OLDPWD), %~ and probably other things.
The above section could be said to introduce $PWD as a local
abbreviation of "Present working directory", but this section for
example doesn't
A `~' by itself is replaced by the value of $HOME. A `~'
followed by a `+'
or a `-' is replaced by the value of $PWD or $OLDPWD, respectively.
Should I fix this, or does nobody care? And by fix, do I mean changing
the appropriate occurrences of "$PWD" to "the current working
directory" or something else? :)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author