Afficher un message
Vieux 31/05/2007, 21h49   #5
Thorsten Kampe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Mimic zsh's right prompt in bash

* Stephane CHAZELAS (Thu, 31 May 2007 19:06:50 GMT)
> 2007-05-31, 19:17(+01), Thorsten Kampe:
> > * Thorsten Kampe (Thu, 31 May 2007 19:02:46 +0100)
> >> * Thorsten Kampe (Thu, 31 May 2007 18:25:17 +0100)
> >> > How can I mimic a typical zsh prompt with the current directory at the
> >> > right in bash?
> >> >
> >> > My zsh prompt is:
> >> > user@host% /path/to/pwd
> >> >
> >> > How can I mimic the right hand side in bash with PS1?
> >>
> >> Oops, that's already been asked in May. I'll read through the
> >> thread...

> >
> > Hm, interesting thread but no answer given. I /guess/ it should be
> > possible to mimic the RPS1 in bash by extending the PS1 prompt to the
> > right.

> [...]
>
> Why don't you use zsh in the first place?


I do to 95%, I swear. But in some environments people haven't seen the
light yet and I have to use what's available there.

> You want to try things like:
>
> PROMPT_COMMAND='printf "%*s\r" "$COLUMNS" "$PWD"'
>
> In anycase, this is bound not to always work, as you need the
> shell to be aware that there are characters at the right of the
> cursor.


I'll try this.

Thorsten
  Réponse avec citation
 
Page generated in 0,04685 seconds with 9 queries