zsh-workers
 help / color / mirror / code / Atom feed
* promptsubst and empty variables
@ 2008-09-14  9:24 Frank Terbeck
  2008-09-14 16:43 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Terbeck @ 2008-09-14  9:24 UTC (permalink / raw)
  To: zsh workers

I am seeing some weirdness using prompt_subst and empty variables in
RPS1 (from zsh -f):

[snip]
setopt promptsubst
RPROMPT='${foo}'
PROMPT='${bar}'
bar='%~%# '
[snap]

This results in the following cursor position:

~%_
  ^- At the underscore, that's where the cursor is. Note, the missing
     trailing space.

I've tried this with quite a few versions of zsh and I'm seeing this
with almost very version I tried:

    + it's not in 3.0, at least not in the versions I tried (not all)
    + it is in every version starting from 3.1.6 except:
        - 4.3.1 and 4.3.2
        - it's back in 4.3.3 and remains to be in the CVS HEAD
          version.


As soon as you but something into $foo in the above snippet (a simple
foo=. is enough), you get the trailing space.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925


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

end of thread, other threads:[~2008-09-15 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-14  9:24 promptsubst and empty variables Frank Terbeck
2008-09-14 16:43 ` Bart Schaefer
2008-09-15 14:34   ` Peter Stephenson
2008-09-15 15:28     ` Frank Terbeck

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