Re: [PATCH] subshell prompt printing fix



-------- Original-Nachricht --------
Datum: Wed, 13 Jun 2007 15:34:17 +0200
Von: Jindrich Novy
An: Pavel Tsekov
Betreff: Re: [PATCH] subshell prompt printing fix

> Maybe yet another point. mc prints command prompt without the control
> codes what perfectly
> makes sense within mc. Also it prints only the last line in case that user
> has multiline
> PS1, for example:
> 
> PS1='\[\033[01;31m\]\H\[\033[00m\]:\[\033[00;01m\]\w\n\033[01;34m\]\$
> \[\033[00m\]'
> 
> Doesn't it make sense to print the complete prompt to the subshell in
> respect to PS1
> including control codes? In case you rely on the fact that the prompt is
> single-lined,
> which is not in this case, the rewriting of the prompt using control
> codes, as you propose,
> will be broken.
> 
> After thinking more about it, it would be better to print the prompt again
> each time a
> cwd in mc is changed. If we do so, we can support the multiline PS1s as
> well.

If I remember correctly the real prompt is stripped off the control characters and trimmed to a single line due to the command prompt widget..  I think that there is a discussion in the mailing list archives - try "zsh" and "cygwin" as search keywords.

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]