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".

Note that if you're using an xterm, you can use the handy escape
sequences to put things like the PWD into window title and/or icon name
of the xterm:

<ESC>]n;text<^G>

where ESC and ^G are the appropriate ascii codes, and n is 2,1, or 0, to
put text in the window title, icon name, or both respectively.  I use:

if tty -s && [[ "$TERM" = "xterm" ]]; then
    chpwd () {
        echo -n "<ESC>]2;$PWD<^G>"
    }
fi

in my .zshrc to set the title bar of the xterm to my current directory.




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