PDA

View Full Version : What do YOU have in your .tcshrc file ?


Vanquish
Sep 28, 2002, 06:36 AM
I think I have a typical UNIX newbie content :D :

alias cp cp -i \!\*
alias mv mv -i \!\*
alias rm rm -i \!\*
alias trash mv \!\* ~/.Trash

So what do you people have in your .tcshrc files ?

Gary Kerbaugh
Sep 28, 2002, 09:45 AM
Originally posted by Vanquish:


alias rm rm -i \!\*
alias trash mv \!\* ~/.Trash


   You're obviously concerned with the dangers of using rm. I had a similar alias for moving items to trash but I've extendied it to a script that emulates rm except that it moves the items to ~/.Trash. However, it uses CpMac to move (so that resource forks are preserved) and appends "copy" to duplicates so that no originals are destroyed. It does a few other things as well. It emulates rm well enough that you can name it rm so that it is used instead of rm, even by scripts. However, I've come to prefer naming it rmm so that scripts can delete what they must. You can find the script at:

http://www.cs.ecu.edu/~kerbaugh/rm/rm.html

   My init scripts include nine files in a 60KB directory, so aren't appropriate for posting. I do have a download of my init scripts for zsh. The aliases and functions there use a different syntax from tcsh but they may give you ideas. That download, if you're interested, is at:

http://www.cs.ecu.edu/~kerbaugh/zsh.tar,gz

   I think I have a link you'll really appreciate! Are you interested in a site where lots of people post their favorite init scripts? It's called Dotfiles.com and can be found at:

http://dotfiles.com

Unfortunately it seems to be having some server problems at the moment but downloads still work and I assume they'll fix it. Enjoy!

Vanquish
Sep 28, 2002, 09:53 AM
I think I have a link you'll really appreciate! Are you interested in a site where lots of people post their favorite init scripts? It's called Dotfiles.com and can be found at:

http://dotfiles.com

Unfortunately it seems to be having some server problems at the moment but downloads still work and I assume they'll fix it. Enjoy!

Cool, thanks !

Kristoff
Sep 29, 2002, 09:52 PM
don't have a .tcshrc, but I have a ~/Library/init/tcsh/environment.mine


#JDK Home
setenv JAVA_HOME /Library/Java/Home

#LS_COLORS base
setenv LS_COLORS "no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:bd =44;32:cd=44
;33:ex=01;32"
# executables (bright green)
setenv LS_COLORS "${LS_COLORS}:*.cmd=01;32:*.exe=01;32:*.com=01;32:* .btm=01;32
:*.bat=01;32"
# archives and compression (dark cyan)
setenv LS_COLORS "${LS_COLORS}:*.tar=36:*.tgz=36:*.rpm=36:*.deb=36:* .arj=36:*.
taz=36:*.lzh=36:*.zip=36:*.z=36:*.Z=36:*.gz=36:*.r ar=36:*.jar=36"
# images (bright magenta)
setenv LS_COLORS "${LS_COLORS}:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:* .xbm=01;35
:*.xpm=01;35:*.tif=01;35"
# video (dark magenta)
setenv LS_COLORS "${LS_COLORS}:*.mpg=01;35:*.avi=01;35"
# sound (bright blue)
setenv LS_COLORS "${LS_COLORS}:*.mp3=01;34:*.wav=01;34:*.au=01;34:*. mid=01;34:
*.voc=01;34:*.mod=01;34:*.aiff=01;34"
# text (bright white)
setenv LS_COLORS "${LS_COLORS}:*.txt=01:*.html=01:*.htm=01:*.doc=01: *.ps=01:*.
pdf=01:*.lyx=01:*README=01:*Makefile=01"
# code (bright red)
setenv LS_COLORS "${LS_COLORS}:*.c=01;31:*.cc=01;31:*.icc=01;31:*.cp p=01;31:*.
pas=01;31:*.tcl=01;31:*.asm=01;31:*.scm=01;31:*.pl =01;31:*.sh=01;31:*.csh=01;31:
*.java=01;31:*.ml=01;31:*.pm=01;31"
# headers (dark red)
setenv LS_COLORS "${LS_COLORS}:*.hh=00;31:*.h=00;31"
# binaries (dark green)
setenv LS_COLORS "${LS_COLORS}:*.o=32:*.a=32:*.so=32:*.obj=32:*.clas s=32"

fat mac moron
Sep 29, 2002, 10:11 PM
Originally posted by Kristoff:
don't have a .tcshrc, but I have a ~/Library/init/tcsh/environment.mine


#JDK Home
setenv JAVA_HOME /Library/Java/Home

#LS_COLORS base
setenv LS_COLORS "no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:bd =44;32:cd=44
;33:ex=01;32"
# executables (bright green)
setenv LS_COLORS "${LS_COLORS}:*.cmd=01;32:*.exe=01;32:*.com=01;32:* .btm=01;32
:*.bat=01;32"
# archives and compression (dark cyan)
setenv LS_COLORS "${LS_COLORS}:*.tar=36:*.tgz=36:*.rpm=36:*.deb=36:* .arj=36:*.
taz=36:*.lzh=36:*.zip=36:*.z=36:*.Z=36:*.gz=36:*.r ar=36:*.jar=36"
# images (bright magenta)
setenv LS_COLORS "${LS_COLORS}:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:* .xbm=01;35
:*.xpm=01;35:*.tif=01;35"
# video (dark magenta)
setenv LS_COLORS "${LS_COLORS}:*.mpg=01;35:*.avi=01;35"
# sound (bright blue)
setenv LS_COLORS "${LS_COLORS}:*.mp3=01;34:*.wav=01;34:*.au=01;34:*. mid=01;34:
*.voc=01;34:*.mod=01;34:*.aiff=01;34"
# text (bright white)
setenv LS_COLORS "${LS_COLORS}:*.txt=01:*.html=01:*.htm=01:*.doc=01: *.ps=01:*.
pdf=01:*.lyx=01:*README=01:*Makefile=01"
# code (bright red)
setenv LS_COLORS "${LS_COLORS}:*.c=01;31:*.cc=01;31:*.icc=01;31:*.cp p=01;31:*.
pas=01;31:*.tcl=01;31:*.asm=01;31:*.scm=01;31:*.pl =01;31:*.sh=01;31:*.csh=01;31:
*.java=01;31:*.ml=01;31:*.pm=01;31"
# headers (dark red)
setenv LS_COLORS "${LS_COLORS}:*.hh=00;31:*.h=00;31"
# binaries (dark green)
setenv LS_COLORS "${LS_COLORS}:*.o=32:*.a=32:*.so=32:*.obj=32:*.clas s=32"



I'm stealing your colors :)

I actually have a .bash_login, but close enough ;)

alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'

alias ftpsite='ftp -i my.ftp.site.goes.here'
alias sshsite='ssh -l username login.my.site.here'

I'm not at home so I can't remember more of it. I know I have some exports for BitchX. :D

Paul McCann
Sep 30, 2002, 12:06 AM
Nothing very fancy in mine, but one thing that apple's old startup scripts didn't provide but some of you might find useful is the following:

set complete = enhance

that allows you to type in lower case, and (for example) when you hit TAB to complete a command or a filename it'll correct the case so as to match. Easier to use than to describe:

% cd
% cd doc<TAB> ====>>>> corrects to ===>>> % cd Documents/

The other thing that I like doing is setting the CDPATH environment variable to include my home directory.

set cdpath = /Users/pmccann

This just means that when you try to change into a directory using a relative path (ie, with no leading / ) the shell will search for directories in your home directory, as well as those in your current working directory. Just saves you having to type "cd;" all the time. So, for example (I've got a source directory called "src" in my home directory.)

% cd /usr/bin
% cd src
~/src

The shell echoes the directory name that it's chosen if cdpath has been used.

More fun is zsh, which allows you to set things up so that you don't need to type the 'cd'. Surprisingly cool, as is just about everything with that shell.

Cheers,
Paul