[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: some tcsh questions



On Fri, Aug 04, 2000 at 10:40:23PM +0200, Jonas Moberg wrote:
> I've (after many years of use..) been looking up what my shell
> actually can do for me to make my life easier. I've been going thru
> the features of tcsh (first shell I ever used, but I'm determined to
> go thru bash and zsh or ksh (when time permits that is..)).

Suggestion:

    o Start with bash and zsh.  I'd suggest you'll generally find  that
	  these are advanced shells which supercede virtually all the
	  functionality of precursor shells, including the Bourne shell line
	  (sh, korn, posix-compliant, bash, bash2) and csh line (csh, tcsh,
	  zsh).  For userland, you're most likely going to find that bash
	  and zsh are going to have features you really, really like.

    You may also want to look at a few alternate shells, for special
	purposes. 
	  
	o ash is a lightweight shell, useful on rescue disks (though
	  last I checked, Tom's Root/Boot seemed to be running a bash-like
	  shell).  As standard shells have bulked up, lightweight shells
	  are finding a place for rescue or limited-storage situations.

    o sash is a "secure" shell -- it contains built-ins for a whole mess
	  of what are normally system commands.  It is also (usually)
	  statically linked -- it doesn't require external libraries.  This
	  makes it useful as a rescue shell or for exploring a system which
	  is suspected of being compromised.

> So, of course, I got some questions for you all.. ;-) When I was
> reading the tcsh man-page I found some interesting examples on how to
> set the xterm title.

See the BashPromptHOWTO for equivalent under bash.

In my .bashrc

	# Following sets prompt to [userid@host dir], and puts the full 
	#   user@host:/full/path/spec in an xterm title bar.
	function proml
	{
	case $TERM in
		xterm*|rxvt|eterm|wterm)
			local TITLEBAR='\[\033]0;\u@\h:\w\007\]'
			;;
		*)
			local TITLEBAR=''
			;;
	esac

	PS1="${TITLEBAR}\
	[\u@\h:\W]\
	\$ "
	PS2='> '
	PS4='+ '
	}

	proml
	unset proml
	export PS1

-- 
Karsten M. Self <kmself@ix.netcom.com>     http://www.netcom.com/~kmself
 Evangelist, Opensales, Inc.                    http://www.opensales.org
  What part of "Gestalt" don't you understand?   Debian GNU/Linux rocks!
   http://gestalt-system.sourceforge.net/    K5: http://www.kuro5hin.org
GPG fingerprint: F932 8B25 5FDD 2528 D595 DC61 3847 889F 55F2 B9B0

Attachment: pgpeiS_pK1NWY.pgp
Description: PGP signature


Reply to: