[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: spaces in filenames
On Wed, Dec 27, 2000, Adi Stav wrote about "Re: spaces in filenames":
> Ah, no. We are talking about five bytes here (plus the length of the
> title). And since it will arrive through telnet (or equivalent)
> together with the rest of the prompt, in normal use it will occupy a
> very small single packet that has to be sent anyway, if only for the
> newline. So there will generally be no latency problem even with very
> slow modems.
I guess I have some sensitivites dating from the days of 300 baud modems ;)
A typical title for me would be around 30 characters, or a full second of
transmission on such a modem... :)
> I don't like the cd aliasing solution because it feels kludgy: what it
> the cwd changes not because of cd (like choo pointed out)? What if you
> want to display data other than your cwd in the title? Anyhow, if
As I pointed out, this is why zsh has the 'chpwd' function.
> efficiency is an principal thing, I suggest caching:
>
> CURRENT_TITLE=""
> retitle() {
This is a nice trick!
(I'll let the computational inefficiency slip by: after all, I can't complain
when I check for email in 20 mailboxes before every prompt!)
> > case "$TERM" in
> > xterm|screen) print -n '\033]2;'"$LOGNAME@$SYS":$PWD'\007';;
> > esac
> Did you manage to get it working with screen? Screen ate my control
> characters when I tried it...
Yes, it works under screen. Try adding the following to your .screenrc:
# special xterm hardstatus: use the window title.
termcapinfo xterm hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007
It works very nicely, with titles changing when you switch windows and
the whole nine yards.
--
Nadav Har'El | Wednesday, Dec 27 2000, 1 Tevet 5761
nyh@math.technion.ac.il |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |If you tell the truth, you don't have to
http://nadav.harel.org.il |remember anything.
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il