Date: Fri, 8 Oct 2004 00:10:09 +0700 From: Alexey Dokuchaev <danfe@nsu.ru> To: Don Lewis <truckman@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: csh is root's shell? Message-ID: <20041007171009.GA36712@regency.nsu.ru> In-Reply-To: <200410071644.i97Giq5a058914@gw.catspoiler.org> References: <136a340a041007045538093bfd@mail.gmail.com> <200410071644.i97Giq5a058914@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 07, 2004 at 09:44:52AM -0700, Don Lewis wrote: > This is what I use: > > set prompt = '%m:%c4 %h%#' > if ($?TERM && $TERM == xterm) then > set prompt='%{\033]0;%n@%m:%c5\007%}%m:%c %h%#' > endif > > It adds the last few components of $cwd and the history event number to > the prompt. When running in an xterm, it puts the username, hostname, > and the last part of $cwd in the xterm title. I use pretty much the same code for setting xterm's titlebar. However, there is one known problem with it: when you leave (^D) your shell, being ssh'ed to another machine, titlebar still has that remote host name. If there was a way to retrieve current title string, sigh. Unless, of course, I'm missing something here. ./danfe
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041007171009.GA36712>