From owner-freebsd-chat Thu Jun 19 08:27:13 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA02281 for chat-outgoing; Thu, 19 Jun 1997 08:27:13 -0700 (PDT) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA02265 for ; Thu, 19 Jun 1997 08:26:59 -0700 (PDT) Received: (from eivind@localhost) by bitbox.follo.net (8.8.5/8.7.3) id RAA15226; Thu, 19 Jun 1997 17:25:56 +0200 (MET DST) Date: Thu, 19 Jun 1997 17:25:56 +0200 (MET DST) Message-Id: <199706191525.RAA15226@bitbox.follo.net> From: Eivind Eklund To: Branson Matheson CC: chat@FreeBSD.ORG In-reply-to: Branson Matheson's message of Thu, 19 Jun 1997 09:30:47 -0400 (EDT) Subject: Re: OS/2 users going to FreeBSD? :-) References: <199706191239.IAA14178@gatekeeper.itribe.net> Sender: owner-chat@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > > > set prompt="%h [%T] %B%n%b@%m:%B%.2%#%b " > > > 255 [23:12] roberto@keltia:/build/ap2> > > > > > set prompt="%t %m %S %/ %s%" > > 8:37am animaniacs /home/jamie % > > while were at it ... for you zsh users ( and zsh is pretty cool if you > havn't looked at it .. especially the =filename function ) zsh is _cool_, and not just if you're a bourne fan, as was was implied earlier - I've found it a better shell overall than tcsh, after approx 5 years of using tcsh, and not being able to live in bash. Things that made me switch: (1) Powerful filename expansion. Pattern matching is almost the power of find. (2) You can write foreach statements on one line, storing it entirely in the history buffer. (3) The default setup isn't to mess up my history entries (which tcsh without histlit do) (4) I can control tab-completion for different commands fairly easily. (5) TAB expands patterns to a list of filenames. and otherwise no loss from tcsh. (Well, .. isn't eligeble for filename expansion - no added / by default. Doesn't bother me, but I know it bother some other people.) > export HOST=`uname -n | awk -F. '{print $1}'` > if [ "${TERM}" = "xterm" ] > then > echo -n "ESC]2; ${LOGNAME}@${HOST}:${PWD} ^G" > chpwd() { echo -n "ESC]2; ${LOGNAME}@${HOST}:${PWD} ^G" } > export PS1="%n@%m %(#.#.>) " > else > export PS1="%n@%m:%~ %(#.#.>) " > fi Neat, but could be neater. Here's the version I ended up with: if [ "${TERM}" = "xterm" ] then chpwd() { echo -n "\e]2; ${LOGNAME}@${HOST%%.*}:$(print -P %~) \007" } chpwd export PS1="%B%n(%m)%#%b " else export PS1="%B%n(%m)%~%#%b " fi It do not mess up the HOST variable (using zsh substitution to strip the hostname instead), can just be cut'n'pasted (inline special characters are done using escapes), use the default prompting character for zsh (~) instead of ">", and use homedir-matching for the name in the title-bar - ie, /home/eivind will change to ~ for me, ~eivind for you. Eivind, trying to get more converts :)