From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: $PWD and ~+ (and others) in documentation
Date: Tue, 21 Sep 2010 17:48:41 +0200 [thread overview]
Message-ID: <AANLkTinCaUZNrQen_FPPqHuMtHz5m=wScCG6K_LWpkwY@mail.gmail.com> (raw)
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
next reply other threads:[~2010-09-21 15:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 15:48 Mikael Magnusson [this message]
2010-09-22 19:26 ` Peter Stephenson
2010-12-06 11:34 ` Mikael Magnusson
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='AANLkTinCaUZNrQen_FPPqHuMtHz5m=wScCG6K_LWpkwY@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=zsh-workers@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).