zsh-workers
 help / color / mirror / code / Atom feed
* $PWD and ~+ (and others) in documentation
@ 2010-09-21 15:48 Mikael Magnusson
  2010-09-22 19:26 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Magnusson @ 2010-09-21 15:48 UTC (permalink / raw)
  To: zsh workers

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-06 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-21 15:48 $PWD and ~+ (and others) in documentation Mikael Magnusson
2010-09-22 19:26 ` Peter Stephenson
2010-12-06 11:34   ` Mikael Magnusson

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