zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: zsh users <zsh-users@sunsite.dk>
Subject: Re: zsh as ksh for login shell -- a bug with PS1?
Date: Sat, 08 Jan 2005 16:24:04 +0000	[thread overview]
Message-ID: <20050108162405.1924985AF@pwstephenson.fsnet.co.uk> (raw)
In-Reply-To: <B4498176-6134-11D9-AB6E-000393768D2C@mcgillsociety.org>

"William H. Magill" wrote:
> I have a two-line prompt string
> 
> PS1='[$PWD] $me
>   $HOST> '
> 
> I have been using this for many years. It works fine under ksh on Tru64 
> Unix 5.1 and when zsh 4.2.1 itself is evoked as the login shell.
> 
> However, if I change the /etc/password entry to evoke ksh instead of 
> zsh, the newline is lost, resulting in a prompt consisting of "$HOST> "

I think you're saying that ksh is really a link to zsh.  In that case
zsh will start up with a different set of options.  Probably the
critical one in this case is single_line_zle.  Try "unsetopt
single_line_zle" and see if that works.  (If my experiment is correct
this is exactly the problem.)

The option isn't there for the prompt, in fact, it's there because ksh
doesn't handle multiple line editing buffers.  It so happens that in zsh
this is associated with a multi-line prompt.  However, it's not at all
clear we really need to enforce this restriction of ksh when emulating
it anyway.  It's hard to think of a case where it's an advantage.

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
Work: pws@csr.com
Web: http://www.pwstephenson.fsnet.co.uk


  reply	other threads:[~2005-01-08 16:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-17 15:34 zsh book? Miek Gieben
2003-11-17 17:50 ` Peter Stephenson
2003-11-17 19:01   ` Nikolai Weibull
2003-11-17 21:30   ` Miek Gieben
2003-11-18 19:05   ` zsh vs ksh William H. Magill
2003-11-19 17:00     ` Peter Stephenson
2003-11-19 17:02     ` Miek Gieben
2003-12-04 12:04       ` zzapper
2005-01-08  5:18       ` zsh as ksh for login shell -- a bug with PS1? William H. Magill
2005-01-08 16:24         ` Peter Stephenson [this message]
2005-01-08 16:50           ` William H. Magill

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=20050108162405.1924985AF@pwstephenson.fsnet.co.uk \
    --to=pws@pwstephenson.fsnet.co.uk \
    --cc=zsh-users@sunsite.dk \
    /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).