Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug or Feature? Clear line before prompt.
- X-seq: zsh-users 9497
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Com MN PG P E B Consultant 3 <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx>
- Subject: Re: Bug or Feature? Clear line before prompt.
- Date: Fri, 14 Oct 2005 11:26:18 +0200
- Cc: zsh-users Mailinglist <zsh-users@xxxxxxxxxx>
- In-reply-to: <6F0CB04509C11D46A54232E852E390AC44B902@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Com MN PG P E B Consultant 3 <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx>, zsh-users Mailinglist <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <6F0CB04509C11D46A54232E852E390AC44B902@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Hi Ronald :)
* Com MN PG P E B Consultant 3 <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx> dixit:
> I don't see the last line of the previous command, unless it is
> terminated
> by a newline. Example:
>
> perl -e 'print "hello"'
>
> does not show the output "hello", because it is erased immediately by
> the shell, but
>
> perl -e 'print "hello\n"
>
> shows, because the output is terminated by \n.
>
> My setting of PS1 is: %B%~%b>
>
> Is there a way to tell zsh not to erase the line before writing the
> prompt?
You can always "unsetopt prompt_cr", but I find this one much
more useful:
# After you've set your PS1
PS1=$'\n'"$PS1"
This prints a newline before the prompt itself. You can achieve
this with precmd, too, you can make it print a newline if there is
text on the current line (I think you can know that in Linux using
/dev/vcs), or if the cursor is in the last column, etc. For me adding
a newline character just before my PS1 is enough.
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author