I have just learned a bit more about the cool sheel that is tcsh.
Here's snippets from my .tcshrc that I'm particularly happy with.
Have fun, and feel free to contribute!
-----------------------------------------------------------------
set prompt='%{\ek\e\\%}%!\,%c3%# '
set rprompt='[%{\033[01;36m%}%m,%t%{\033[00m%}]'
-----------------------------------------------------------------
These lines set my prompt to be
jobnumber,workingdir> [hostname,clock]
I like having my jobnumber, since I'm too lazy to retype or search for
command lines and ! isn't smart enough to deal with java/javac
difference. ;)
Workingdir is just the last three components of the real
directory. I like knowing where I am, but long paths become really
unmanageable. I don't like paths taking up all of my screen space, but I
don't want just the basename. tcsh lets me achieve a reasonable
compromise.
>, of course, switches to # if I'm root.
[hostname,clock] is over there on the right side and it's nicely
colored so that I can easily see where one command's output ends and the
other begins. This helps a lot when I'm paging up and it allows me to
easily see the time. I don't color my leftprompt because I'll be staring
at this much more often, so I prefer it to be unobtrusive.
---------------------------------------------------
alias aoeu 'xmodmap ~/.qwerty; loadkeys us'
alias asdf 'xmodmap ~/.dvorak; loadkeys dvorak'
-----------------------------------------------------------------
So that qwerty-users can still use my laptop. I didn't switch the
keycaps around, so even qwerty hunt-and-peckers will still be okay.
Added at the request of Gino and William, who probably are still
convinced that I'm out of my mind to use dvorak.
-----------------------------------------------------------------
setenv complete enhance
-----------------------------------------------------------------
ls d.j<tab> expands to developer.java.sun.com and whatever else.
This is fun with
-----------------------------------------------------------------
set SSHHOSTS (cersa.admu.edu.ph eliazo.cersa.admu.edu.ph [EMAIL PROTECTED]
[EMAIL PROTECTED] courses.ateneo.edu)
complete ssh "p/1/($SSHHOSTS)/"
-----------------------------------------------------------------
and tons of other stuff I picked up from the tcsh section on completion.
I don't have to remember the options to 'find' - I can autocomplete! =D
-----------------------------------------------------------------
bindkey -e # emacs bindings
bindkey -b C-R i-search-back # There, William!
-----------------------------------------------------------------
... hmmm. I think I'm going to reread the tcsh manpage. Apparently I can
hit M-h to get help on the current command... way cool.
Anyone have cool tcsh snippets to share?
--
Sacha Chua <[EMAIL PROTECTED]> 3 BS CS geek =)
Ateneo Cervini-Eliazo Networks (ACENT) tel: 63(2) 426-6001 loc 5925
BOFH excuse #196: Me no internet, only janitor, me just wax floors.
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]