# .tcshrc - 11/12/05 21:12 - Turea Alexandru Teodor (classicmanpro@yahoo.com) if ( ${uid} == 0 ) set root ####################### # ##### GENERAL ##### # ####################### umask 077 limit coredumpsize 0 limit -h coredumpsize 0 ##################################### # ##### ENVIRONMENT VARIABLES ##### # ##################################### setenv LS_COLORS 'no=01;37:fi=01;37:di=01;34:ln=01;36:pi=01;32:so=01;35:do=01;35:bd=01;33:cd=01;33:ex=01;31:mi=00;37:or=00;36:' setenv PAGER 'less' if ( -X vim ) then setenv EDITOR 'vim' else if ( -X elvis ) then setenv EDITOR 'elvis' else setenv EDITOR 'vi' endif setenv VISUAL "${EDITOR}" unsetenv HPATH ############################### # ##### SHELL VARIABLES ##### # ############################### set color set filec set rmstar set dunique set autolist set ellipsis set dextract set addsuffix set noclobber set autoexpand set autocorrect set pushdsilent set pushdtohome set printexitvalue set history = 50 set savehist = 50 set histdup = all set savedirs = 50 set killring = 50 set killdup = all set correct = all set listjobs = long set echo_style = both set symlinks = chase set inputmode = insert set matchbeep = ambiguous set promptchars = '%#' set listflags = 'A' set watch = (0 any any) set who = "%n(`whoami`) has %a %l from %M" unset {histfile,dirsfile,autologout,implicitcd,notify,tperiod} ####################### # ##### ALIASES ##### # ####################### alias . 'source' alias rmd 'rm -fr' alias x 'exit' alias z 'suspend' alias j 'jobs -l' alias osr 'shutdown -r now' alias osh 'shutdown -h now' alias p "${PAGER}" alias e "${EDITOR}" alias ds 'dirs -v' alias dsl 'dirs -L' alias dss 'dirs -S' alias dsc 'dirs -c' alias po 'popd' # po [+n] alias pu 'pushd' # pu [name|+n] alias cd 'pu' # cd [name|+n] alias chdir 'cd' # chdir [name|+n] alias .. 'cd ..' alias - 'cd -' alias c 'clear' alias h 'history' alias hc 'history -c' alias hcc 'hc;c' alias cx 'cd;dsc;hc;x' alias ll 'ls --color=auto -FAql' alias lf 'ls --color=auto -FAq' alias mfloppy 'mount /dev/fd0 /mnt/floppy' alias umfloppy 'umount /mnt/floppy' alias mdvd 'mount -t iso9660 -o ro /dev/dvd /mnt/dvd' alias umdvd 'umount /mnt/dvd' alias mcdrom 'mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom' alias umcdrom 'umount /mnt/cdrom' alias miso "mount -t iso9660 -o ro,loop '\!*' /mnt/iso" alias umiso 'umount /mnt/iso' alias ff "find . -name '\!*' -print" alias psa 'ps aux' alias psu 'ps ux' alias lpsa "ps aux \!* | p" alias lpsu "ps ux \!* | p" alias dub 'du -sclb' alias duk 'du -sclk' alias dum 'du -sclm' alias duh 'du -sclh' alias dfk 'df -PTak' alias dfm 'df -PTam' alias dfh 'df -PTah' alias dfi 'df -PTai' alias dmsg 'dmesg | p' alias kernfs 'p /proc/filesystems' alias shells 'p /etc/shells' alias lfstab 'p /etc/fstab' alias lxconf 'p /etc/X11/xorg.conf' if ( ${?root} ) then alias efstab 'e /etc/fstab' alias exconf 'e /etc/X11/xorg.conf' alias txconf 'X -probeonly' endif ############################### # ##### SPECIAL ALIASES ##### # ############################### alias helpcommand 'man' # run-help unalias {beepcmd,cwdcmd,jobcmd,periodic,precmd,postcmd,shell} ########################### # ##### COMPLETIONS ##### # ########################### complete mount \ 'n/-t/(4.2 4.3 adfs affs autofs bdev coda coherent cramfs devpts efs ext ext2 ext3 hfs hpfs iso9660 jfs mfs minix msdos ncpfs nfs ntfs pipefs proc qnx4 ramfs reiserfs romfs rootfs S51K S52K shm smbfs sockfs sysv tmp tmpfs udf ufs umsdos usbfs usbdevfs vfat xenix xfs xiafs)/' \ 'n/-o/(async atime auto defaults dev exec _netdev noatime noauto nodev noexec nosuid nouser remount ro rw suid sync dirsync user users)/' \ 'n/-O/(async atime auto defaults dev exec _netdev noatime noauto nodev noexec nosuid nouser remount ro rw suid sync dirsync user users)/' \ 'p/*/f/' \ 'p/*/d/' complete find \ 'n/-anewer/f/' \ 'n/-cnewer/f/' \ 'n/-group/g/' \ 'n/-ilname/f/' \ 'n/-iname/f/' \ 'n/-ipath/f/' \ 'n/-iregex/f/' \ 'n/-lname/f/' \ 'n/-name/f/' \ 'n/-newer/f/' \ 'n/-path/f/' \ 'n/-regex/f/' \ 'n/-type/(b c d p f l s D)/' \ 'n/-user/u/' \ 'n/-xtype/(b c d p f l s D)/' \ 'n/-exec/c/' \ 'n/-fls/f/' \ 'n/-fprint/f/' \ 'n/-fprint0/f/' \ 'n/-fprintf/f/' \ 'n/-ok/c/' \ 'c/--/(help version)/' \ 'c/-/(daystart depth follow help maxdepth mindepth mount noleaf version xdev amin anewer atime cmin cnewer ctime empty false fstype gid group ilname iname inum ipath iregex links lname mmin mtime name newer nouser nogroup path perm regex size true type uid used user xtype exec fls fprint fprint0 fprintf ok print print0 printf prune ls)/' \ 'n/-fstype/(4.2 4.3 adfs affs autofs bdev coda coherent cramfs devpts efs ext ext2 ext3 hfs hpfs iso9660 jfs mfs minix msdos ncpfs nfs ntfs pipefs proc qnx4 ramfs reiserfs romfs rootfs S51K S52K shm smbfs sockfs sysv tmp tmpfs udf ufs umsdos usbfs usbdevfs vfat xenix xfs xiafs)/' \ 'p/*/d/' complete {mkfs,fsck} 'n/-t/(4.2 4.3 adfs affs autofs bdev coda coherent cramfs devpts efs ext ext2 ext3 hfs hpfs iso9660 jfs mfs minix msdos ncpfs nfs ntfs pipefs proc qnx4 ramfs reiserfs romfs rootfs S51K S52K shm smbfs sockfs sysv tmp tmpfs udf ufs umsdos usbfs usbdevfs vfat xenix xfs xiafs)/' complete {{,z}cat,pico,nano,vi,{,{,r}g,e,r}vi{m,ew},vimdiff,elvis,emacs,{,r}ed,e{,x},joe,jstar,jmacs,rjoe,jpico,{,z}less,{,z}more,p{,g}} 'p/*/f/' complete {man,where{,is},which,whatis,sudo,info,apropos} 'p/*/c/' complete kill 'c/-/S/' 'n/-s/S/' 'c/%/j/' 'p/*/(%)/' complete qmake 'n/-o/(Makefile)/' 'p/*/f:*.pro/' complete {{,un}setenv,printenv,env} 'p/*/e/' complete {fg,bg,stop} 'c/%/j/' 'p/*/(%)/' complete {,un}alias 'p/*/c/' 'p/*/a/' complete {cd,pushd,{ch,mk,rm}dir} 'p/*/d/' complete {finger,pinky,groups,id} 'p/*/u/' complete {,un}complete 'p/1/X/' complete {,un}set 'p/*/s/' ############################## # ##### PROMPT SECTION ##### # ############################## # set color_name = '%{^[[ color_code m%}' set rgb_restore = '%{^[[00m%}' set rgb_black = '%{^[[00;30m%}' set rgb_firebrick = '%{^[[00;31m%}' set rgb_red = '%{^[[01;31m%}' set rgb_forest = '%{^[[00;32m%}' set rgb_green = '%{^[[01;32m%}' set rgb_brown = '%{^[[00;33m%}' set rgb_yellow = '%{^[[01;33m%}' set rgb_navy = '%{^[[00;34m%}' set rgb_blue = '%{^[[01;34m%}' set rgb_purple = '%{^[[00;35m%}' set rgb_magenta = '%{^[[01;35m%}' set rgb_cadet = '%{^[[00;36m%}' set rgb_cyan = '%{^[[01;36m%}' set rgb_gray = '%{^[[00;37m%}' set rgb_white = '%{^[[01;37m%}' set rgb_std = "${rgb_white}" if ( ${?root} ) then set rgb_usr = "${rgb_red}" else set rgb_usr = "${rgb_green}" endif if ( ${?prompt} ) set prompt="${rgb_usr}`whoami`${rgb_std} %c ${rgb_usr}%#${rgb_restore} " unset rgb_* ############################ # ##### KEY BINDINGS ##### # ############################ bindkey "^[j" complete-word-back bindkey "^[k" complete-word-fwd bindkey "^[m" list-glob bindkey "^[e" expand-line bindkey "^[g" expand-glob bindkey "^[v" expand-variables bindkey "^[z" normalize-path bindkey "^[x" normalize-command bindkey "^[i" i-search-fwd bindkey "^[I" i-search-back bindkey "^[a" spell-line bindkey "^[o" overwrite-mode bindkey "^[q" keyboard-quit ############################################# # ##### SOURCE/LOAD - DIRECTORY STACK ##### # ############################################# set usr_cwd = "`pwd`" # most WMs open terminals in specific locations therefore note the current working directory dsl # source/load the directory stack, if present ... this usually changes the current working directory cd "${usr_cwd}" # 'cd' back to the initial/original working directory and push it onto the directory stack unset usr_cwd # cleanup ####################### # ##### THE END ##### # ####################### if ( ${?root} ) unset root