Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: On the topic of prompts



I've thought about sticking a highlighted status line on the last line
of a vt100 or xterm which would contain handy info like PWD, but I
could never figure out how. Could you be more specific about what you
mention below? I've never programmed a terminal before and I'm not
sure what you mean by games with the "termcap sequences".

thanks

Bart Schaefer said:
> 
> You can play all sorts of games with %{...%} and termcap sequences if
> your terminal can set scrolling regions and so forth.  If you're using
> an xterm, you can use something like this to change the title bar:
> 
> if [[ "$TERM" =3D xterm* || "$TERM" =3D vs100 || "$TERM" =3D vs100s ]]
> then
>     # Set top to introduce titlebar change
>     top=3D'=1B]0;'
>     # Set back to end titlebar change
>     back=3D'=07'
>     # Create precmd() to put stuff in the title bar
>     precmd() { print -nP "%{$top%m.%l:%2c - %t$back%}" }
> fi
> 

-- 
Thank you for your time and consideration.  

             _ - - - _                             
           /)-  - _     _                          
          / |_o_/  -       _        
              \__  -          _        
                \ \_              -   _  _  _  _   _  _  _  _  _       
                 _                      
   __ __ _ _  -        
Jose Unpingco 
ECE 0407
(619) 546-8809




Messages sorted by: Reverse Date, Date, Thread, Author