zsh-users
 help / color / mirror / code / Atom feed
* Somehow my prompt broke in 5.2
@ 2016-01-07  3:36 Jason L Tibbitts III
  2016-01-07  4:44 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Jason L Tibbitts III @ 2016-01-07  3:36 UTC (permalink / raw)
  To: zsh-users

I'm trying to understand why the current directory is missing from my
(left) prompt string in 5.2 but appears just fine in 5.1.1 and earlier.

Here is a minimal .zshrc which shows the problem:

-----
setopt Prompt_Subst
autoload -Uz vcs_info

function precmd {
    vcs_info 'prompt'
}

zstyle ':vcs_info:*:prompt:*' nvcsformats "" "%~"

function lprompt {
    local vcs='${vcs_info_msg_1_/$HOME/~}'
    PROMPT="%m:${vcs}> "
}

lprompt
-----

On 5.1.1 I see something like:

  foo:~>

but on 5.2 I just get:

  foo:>

However, if I change lprompt to:

function lprompt {
    PROMPT="%m:${vcs_info_msg_1_/$HOME/~}> "
}
  
(or just dispense with the function and set PROMPT directly) then 5.1.1
behaves the same way as 5.2.  I don't understand what's different about
these two cases.

Now, I can't really recall why I set things up this way; I've had it for
years and obviously copied it from somewhere without really
understanding it and then did my own tweaking over time.  I will work on
another way of doing it, but I'd still like to know what's changed in
5.2 to cause this to stop working.  (I didn't see anything relevant in
the release notes.)

 - J<


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

end of thread, other threads:[~2016-01-10 20:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07  3:36 Somehow my prompt broke in 5.2 Jason L Tibbitts III
2016-01-07  4:44 ` Bart Schaefer
2016-01-07  6:52   ` Jason L Tibbitts III
2016-01-10  7:46   ` Sebastian Gniazdowski
2016-01-10 20:11     ` Bart Schaefer

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