Spacer http://macenterprise.org MacResource.org - Mac OS X enterprise deployment project Spacer
Site Map Contact Us Site Map About Us Top Background
 
Search
 
 
Customizing your tcsh environment E-mail
Written by Lance Ogletree   
Monday, 21 March 2005

Just thought I'd throw this tip out for those wanting to experiment with a customized tcsh environment.

Setting up a customized tcsh environment is pretty simple. Once you've opened up a new terminal window, execute the following:
echo "source /usr/share/tcsh/examples/rc" >> ~/.tcshrc Next, execute:
mkdir -p ~/Library/init/tcsh
This will create a directory structure in your home Library dir. You can now cd to ~/Library/init/tcsh
and begin to create some of your custom login files. Two files I mainly deal with are aliases.mine and environment.mine.
If you create an aliases.mine file in ~/Library/init/tcsh/ (using pico,vi or favorite unix text editor) , you can setup shortcuts for commands. One that I use is the ls command for list directory contents. Under 10.3.x Panther, I have the following entered in my aliases.mine file:
alias ls 'ls -alG' This allows the terminal to display the directory contents using the colorized option of ls.

By also creating an environment.mine file you can customize things such as your text editor of choice( such as vi or pico) or even your terminal prompt. One interesting prompt string I discovered, after a lot of searching on the net was the following:
set prompt = " %{\033]0;%t:%d:%M:%c3\007%}%{\033[93m%}[%P]%{\033[0m%} [%d] %{\033[31m%}[%M]%{\033[0m%} %B[%/]%b \n%n > "
This prompt string needs to be copied/pasted as a single line in your environment.mine file. It provides for the following style prompt:

[14:18:54] [Mon] [my.mac.edu] [/Applications]
me >

Each part of the prompt is displayed in its own color. While using OS X's terminal app, this prompt string also displays that same information as part of the terminal window title. This gives a nice quick way to see what the working directory is for each of your terminal windows.

Some additional links :
http://nparikh.freeshell.org/unix/prompt.php
http://www.oreilly.com/catalog/tcsh/
http://kung-foo.tv/ansi.php
Add as favourites (89) | Quote this article on your site | E-mail

Be first to comment this article
RSS comments

Only registered users can write comments.
Please login or register.

Powered by AkoComment Tweaked Special Edition v.1.4.4

Last Updated ( Monday, 21 March 2005 )