summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.Xrc.cs31
-rw-r--r--.Xresources20
-rw-r--r--.config/bash/rc.sh10
-rw-r--r--.config/cron/make-config2
-rw-r--r--.config/emacs/custom.el15
-rw-r--r--.config/emacs/init.el8
-rw-r--r--.config/git/config2
-rw-r--r--.config/login.local.sh10
-rw-r--r--.config/login.sh49
-rw-r--r--.config/selected_editor6
-rw-r--r--.config/ssh/authorized_keys1
-rw-r--r--.config/ssh/known_hosts8
-rw-r--r--.config/symlinks1
-rw-r--r--.cshrc18
-rw-r--r--.dmrc4
-rw-r--r--.kshrc10
-rwxr-xr-x.local.sun4u/bin/grep2
-rwxr-xr-x.local.sun4u/bin/make2
-rwxr-xr-x.local.sun4u/bin/sed2
-rwxr-xr-x.local/bin/config-path24
-rwxr-xr-x.local/bin/config-symlinks9
-rwxr-xr-x.local/bin/cronic48
-rw-r--r--.login6
23 files changed, 241 insertions, 47 deletions
diff --git a/.Xrc.cs b/.Xrc.cs
new file mode 100755
index 0000000..5fa2147
--- /dev/null
+++ b/.Xrc.cs
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+eval `/usr/local/bin/defaultpaths -sh`
+
+eval `xrdb -global -symbols | sed -ne '/=/!d;s/^-D//;p'`
+
+host=`/usr/local/bin/shorthostname | sed -e 'h;s/.//;x;s/\(.\).*/\1/;y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/;G;s/\n//'`
+
+# For OpenWindows apps
+if [ -d /usr/openwin ]; then
+ OPENWINHOME=/usr/openwin; export OPENWINHOME
+ HELPPATH=$OPENWINHOME/lib/help; export HELPPATH
+ PATH=${PATH}:/usr/openwin/bin
+fi
+
+# load .Xresources and .Xdefaults into the X resource database
+for i in $HOME/.Xresources $HOME/.Xdefaults; do
+ [ -f $i ] && xrdb -merge $i
+done
+
+# do these in a subshell so they don't become zombies on exit
+(
+ xscreensaver &
+ fvwm & # window manager
+ xterm -geometry 80x24-0+257 -T "$host" -n "$host" &
+)
+
+# only grab the actual console when we're running on a local display
+[ "$SERVERHOST" != "lore.cs.purdue.edu" -a "$SERVERHOST" = "$CLIENTHOST" ] && consflag=-C
+# kill this xterm to end your session
+exec xterm $consflag -geometry 80x14-0+15 -T console -n console -fg darkslategray -bg burlywood3
diff --git a/.Xresources b/.Xresources
new file mode 100644
index 0000000..2b8f856
--- /dev/null
+++ b/.Xresources
@@ -0,0 +1,20 @@
+xscreensaver.timeout: 0:10:00
+xscreensaver.cycle: 0:10:00
+xscreensaver.lock: True
+xscreensaver.lockTimeout: 0:00:00
+xscreensaver.passwdTimeout: 0:01:00
+xscreensaver.passwdTimeoutEnable: True
+xscreensaver.dpmsEnabled: True
+xscreensaver.dpmsStandby: 0:10:00
+xscreensaver.dpmsSuspend: 0:10:00
+xscreensaver.dpmsOff: 0:10:00
+
+XTerm*iconic: off
+XTerm*loginShell: on
+XTerm*reverseWrap: on
+XTerm*saveLines: 200
+XTerm*scrollBar: on
+XTerm*visualBell: off
+XTerm*font: 7x13
+
+Dtterm*loginShell: on
diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh
index ab690cf..15a9865 100644
--- a/.config/bash/rc.sh
+++ b/.config/bash/rc.sh
@@ -1,4 +1,7 @@
# ~/.bashrc: executed by bash(1) for interactive non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
# I include this file for all interactive invocations of bash(1), whether
# they are login shells or not.
@@ -78,3 +81,10 @@ if [[ -d ${XDG_CONFIG_HOME}/bash/rc.d ]]; then
. "$file"
done
fi
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+fi
diff --git a/.config/cron/make-config b/.config/cron/make-config
index 6e0fca9..516334a 100644
--- a/.config/cron/make-config
+++ b/.config/cron/make-config
@@ -1,2 +1,2 @@
# m h dom mon dow command
-*/5 * * * * cronic bash -c '. $HOME/.local/lib/path.sh && . $HOME/.local/lib/xdg.sh && make -C $XDG_CONFIG_HOME'
+*/5 * * * * $HOME/.local/bin/cronic bash -c '{ . $HOME/.local/lib/path.sh && . $HOME/.local/lib/xdg.sh && make -C $XDG_CONFIG_HOME; } 2>&1'
diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el
index 47bf654..90cbcd7 100644
--- a/.config/emacs/custom.el
+++ b/.config/emacs/custom.el
@@ -3,16 +3,12 @@
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
- '(ansi-color-faces-vector [default bold shadow italic underline bold bold-italic bold])
- '(ansi-color-names-vector (vector "#ffffff" "#ff9da4" "#d1f1a9" "#ffeead" "#bbdaff" "#ebbbff" "#99ffff" "#002451"))
'(custom-enabled-themes (quote (tango-dark)))
'(custom-safe-themes (quote ("9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "71b172ea4aad108801421cc5251edb6c792f3adbaecfa1c52e94e3d99634dee7" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default)))
'(erc-nick "lukeshu")
'(explicit-shell-file-name "/bin/bash")
- '(fci-rule-color "#00346e")
'(global-whitespace-mode nil)
'(inhibit-startup-screen t)
- '(maildir-mail-dir "~/Maildir")
'(mdmua-maildir "~/Maildir")
'(minibuffer-prompt-properties (quote (read-only t point-entered minibuffer-avoid-prompt face minibuffer-prompt)))
'(page-break-lines-char 45)
@@ -22,17 +18,10 @@
'(scroll-bar-mode nil)
'(send-mail-function (quote smtpmail-send-it))
'(sh-basic-offset 8)
- '(sh-indent-comment t)
- '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com")
- '(smtpmail-smtp-service 587)
- '(vc-annotate-background "#2b2b2b")
- '(vc-annotate-color-map (quote ((20 . "#bc8383") (40 . "#cc9393") (60 . "#dfaf8f") (80 . "#d0bf8f") (100 . "#e0cf9f") (120 . "#f0dfaf") (140 . "#5f7f5f") (160 . "#7f9f7f") (180 . "#8fb28f") (200 . "#9fc59f") (220 . "#afd8af") (240 . "#bfebbf") (260 . "#93e0e3") (280 . "#6ca0a3") (300 . "#7cb8bb") (320 . "#8cd0d3") (340 . "#94bff3") (360 . "#dc8cc3"))))
- '(vc-annotate-very-old-color "#dc8cc3")
- '(wl-init-file "~/.emacs.d/wl.el")
- '(wl-score-files-directory "~/.emacs.d/elmo"))
+ '(sh-indent-comment t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
- )
+)
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 2a7645f..c23b03a 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -1,6 +1,6 @@
;; Preliminary settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(set-face-attribute 'default nil :height 80)
+;(set-face-attribute 'default nil :height 80)
(setq notify-method 'notify-via-libnotify)
(add-to-list 'load-path "~/.emacs.d/")
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
@@ -58,10 +58,10 @@
;; General settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(require 'go-mode-load)
+;(require 'go-mode-load)
-(require 'mailcrypt)
-(mc-setversion "gpg")
+;(require 'mailcrypt)
+;(mc-setversion "gpg")
(add-hook 'wl-summary-mode-hook 'mc-install-read-mode)
(add-hook 'wl-mail-setup-hook 'mc-install-write-mode)
diff --git a/.config/git/config b/.config/git/config
index 218b006..e5593c6 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -1,6 +1,6 @@
[user]
name = Luke Shumaker
- email = LukeShu@sbcglobal.net
+ email = shumakl@purdue.edu
[color]
ui = auto
[sendemail]
diff --git a/.config/login.local.sh b/.config/login.local.sh
new file mode 100644
index 0000000..bead00c
--- /dev/null
+++ b/.config/login.local.sh
@@ -0,0 +1,10 @@
+# PAM seems to be setting EDITOR...
+if [[ $EDITOR = /usr/bin/vi ]]; then
+ unset EDITOR
+fi
+if { [[ $LANG = C ]] || [[ -z $LANG ]]; } && grep '^en_US.UTF-8\s' /etc/locale.gen &>/dev/null; then
+ export LANG=en_US.UTF-8
+fi
+if [[ -z $GOROOT ]]; then
+ export GOROOT=/homes/shumakl/.prefix.$(uname -m)/go
+fi
diff --git a/.config/login.sh b/.config/login.sh
index e1650b2..c43a4a0 100644
--- a/.config/login.sh
+++ b/.config/login.sh
@@ -1,4 +1,3 @@
-#!/bin/bash
# ~/.profile: executed by the command interpreter for login shells.
# I like that graphical login scripts be configured to load this, so
# it always runs, graphical or not.
@@ -18,18 +17,42 @@ umask 022
# TMPDIR #############################################################
-if [[ ! -d "$HOME/tmp" ]]; then
- tmp="$(mktemp --tmpdir -d "$USER-tmpdir.XXXXXXXXXXXXXXXXXXX")"
- ln -sf "$tmp" "$HOME/tmp"
+if [[ ! -d "$HOME/tmp/$HOSTNAME" ]]; then
+ tmp="$(mktemp --tmpdir -d "$USER@$HOSTNAME-tmpdir.XXXXXXXXXXXXXXXXXXX")"
+ mkdir -p -- "$HOME/tmp"
+ ln -sf "$tmp" "$HOME/tmp/$HOSTNAME"
unset tmp
fi
-export TMPDIR="$HOME/tmp"
+export TMPDIR="$HOME/tmp/$HOSTNAME"
+if type flock &>/dev/null; then
+ if [[ "$(readlink -f /dev/fd/7)" != "$(readlink -f "$TMPDIR/.uselock")" ]]; then
+ exec 7>"$TMPDIR/.uselock"
+ fi
+ if flock -sn 7; then
+ _logout_tmpdir_cleanup() {
+ if flock -xn 7; then
+ rm -rf -- "$(readlink -f "$TMPDIR")"
+ rm -- "$TMPDIR"
+ fi
+ }
+ trap _logout_tmpdir_cleanup EXIT
+ fi
+fi
+
+
# XDG ################################################################
. "$HOME/.local/lib/xdg.sh"
ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime
+
+# Box-specific stuff #################################################
+
+if [[ -f "$XDG_CONFIG_HOME/login.local.sh" ]]; then
+ . "$XDG_CONFIG_HOME/login.local.sh"
+fi
+
# Settings ###########################################################
# Spell check
@@ -74,19 +97,3 @@ if [[ -z $XAUTHORITY ]]; then
export XAUTHORITY="$HOME/.Xauthority"
#export XAUTHORITY=$HOME/.runtime/Xauthority
fi
-
-# D-Bus
-# if [[ -z $DBUS_SESSION_BUS_ADDRESS ]] && type dbus-launch &>/dev/null; then
-# # I want a separate instance for each login
-# #dbus-launch > "${HOME}/.cache/sessions/dbus"
-# #. "${HOME}/.cache/sessions/dbus"
-# eval `dbus-launch`
-
-# export DBUS_SESSION_BUS_ADDRESS
-# export DBUS_SESSION_BUS_PID
-# fi
-
-# Load any box-specific stuff
-if [[ -f "$XDG_CONFIG_HOME/login.local.sh" ]]; then
- . "$XDG_CONFIG_HOME/login.local.sh"
-fi
diff --git a/.config/selected_editor b/.config/selected_editor
index 7631487..eec2325 100644
--- a/.config/selected_editor
+++ b/.config/selected_editor
@@ -1,4 +1,6 @@
-# Generated by /usr/bin/select-editor
SELECTED_EDITOR="emacsclient -a '' -c"
-ALTERNATE_EDITOR='nano'
+if [[ -n $SSH_CONNECTION ]]; then
+ SELECTED_EDITOR+=" -nw"
+fi
+ALTERNATE_EDITOR='/usr/bin/vim'
VISUAL="$SELECTED_EDITOR"
diff --git a/.config/ssh/authorized_keys b/.config/ssh/authorized_keys
new file mode 100644
index 0000000..559db0b
--- /dev/null
+++ b/.config/ssh/authorized_keys
@@ -0,0 +1 @@
+ssh-dss AAAAB3NzaC1kc3MAAACBAP1prJhR7vEDJczVYK2otEMX3yiQTh35qwzQl0gKqIoaK/kkh36DHtMgGw1XyIG+LsowgxWGTi8wGxFwEbNVUDPVxnZrBsZq8RhhltFH1i6xLzAa8yAFfRC5Y9Rg5i27//GwfjaZggiMnI9QpvJFuuFVSXY7n2hymZtm8HzaXLuNAAAAFQDsncdoWgp33q+9uq4Bvk+of5ABEQAAAIEAl55Q6bFiGvnyDauH0dsYOu80MdF6xSPu3T8UORsblmNJzhhFcHpTsqK78jFtfKoirZgzTN481gmzi9GHOcfdEHRGkou4xKw9bFPxOpDLxpVd9HI8KYGi2CfoQNb3uAcIPZGEUNGliBbsWdmanv59aNLt4BVmgcVO2AWMqdkPd6UAAACBAJmLZckCmMKLAQtpl/A9dC5Ny8WtaNHjTdhc6qt5rFG9h0XQ0NO54s0JF3mE9DO/6JYzK2RJsBeSucCBSaAkmJkGt7EI3BvZn7qbzDv4AatFDJs0SG/S89Qu4KrDsogGSiI37Kpa69QpK7sBUyCf9Si7/kxF008QzwU/ufzNmvTV shumakl@cs.purdue.edu
diff --git a/.config/ssh/known_hosts b/.config/ssh/known_hosts
new file mode 100644
index 0000000..a70ec49
--- /dev/null
+++ b/.config/ssh/known_hosts
@@ -0,0 +1,8 @@
+gitorious.org,87.238.52.168 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwurz6NXf01Lc2HTGvPGN2RRIjW5zZ4qI8dCTdhr6R241VXO30X29EpBPRFTe3K9Zx7BXAM1XzQaV093xT8jX6X0gP/vJD2y+vDN2IDx2GeLX1k0cevhCj2mn8Su3ZWw5s9bBhVvpSvrE9uLRho2Qe/x5hJt2804KDyRGWn3esVP2dYRbf4r4TBLX/oWziDv64x5G0SkY8YsX2ZbKSX1Biw4oQXSx5jKOaCjNS+ryJFVmiIBqHa7Voi3LgJT/lHZV39sKbMNcnsQNjtkB1eqzzvdwO5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6OS3KMNRkUgx6vL/6/D555Xdypys+lwLmcdmnM=
diff --git a/.config/symlinks b/.config/symlinks
index 030954c..bee823b 100644
--- a/.config/symlinks
+++ b/.config/symlinks
@@ -8,6 +8,7 @@
.config/X11/clientrc .xinitrc
.config/X11/serverrc .xserverrc
.config/X11/login .xsession
+.config/X11/login .xprofile
# Bash
.config/bash/rc.sh .bashrc
diff --git a/.cshrc b/.cshrc
new file mode 100644
index 0000000..81905a4
--- /dev/null
+++ b/.cshrc
@@ -0,0 +1,18 @@
+# this file is processed on every csh invocation
+
+# set PATH and MANPATH based on machine type
+eval `/usr/local/bin/defaultpaths -csh`
+
+# set default file/directory creation protection
+umask 027
+
+setenv ENTOMB yes
+
+# skip the rest if the shell is non-interactive, i.e. is running a script
+if ( ! $?prompt ) exit
+
+set prompt = "`shorthostname` \! % "
+set history = 50
+set notify = on
+
+alias mail mailx
diff --git a/.dmrc b/.dmrc
new file mode 100644
index 0000000..a6cb5eb
--- /dev/null
+++ b/.dmrc
@@ -0,0 +1,4 @@
+
+
+[Desktop]
+Session=gnome
diff --git a/.kshrc b/.kshrc
new file mode 100644
index 0000000..bd4de5c
--- /dev/null
+++ b/.kshrc
@@ -0,0 +1,10 @@
+# this file is processed on each invocation of ksh
+
+# skip the rest if the shell is non-interactive, i.e. is running a script
+[[ "$-" != *i* ]] && return
+
+PS1="`shorthostname` ! $ "
+HISTSIZE=50
+HISTFILE=$HOME/.sh_history # pdksh doesn't set this by default
+
+alias mail=mailx
diff --git a/.local.sun4u/bin/grep b/.local.sun4u/bin/grep
new file mode 100755
index 0000000..481a7a9
--- /dev/null
+++ b/.local.sun4u/bin/grep
@@ -0,0 +1,2 @@
+#/bin/bash
+ggrep "$@"
diff --git a/.local.sun4u/bin/make b/.local.sun4u/bin/make
new file mode 100755
index 0000000..fff3f2d
--- /dev/null
+++ b/.local.sun4u/bin/make
@@ -0,0 +1,2 @@
+#/bin/bash
+gmake "$@"
diff --git a/.local.sun4u/bin/sed b/.local.sun4u/bin/sed
new file mode 100755
index 0000000..3707eb6
--- /dev/null
+++ b/.local.sun4u/bin/sed
@@ -0,0 +1,2 @@
+#/bin/bash
+gsed "$@"
diff --git a/.local/bin/config-path b/.local/bin/config-path
index 6b9019c..99f0910 100755
--- a/.local/bin/config-path
+++ b/.local/bin/config-path
@@ -24,28 +24,46 @@ in_array() {
# Import existing values
IFS=: paths=($PATH)
+IFS=: manpaths=($MANPATH)
IFS=: rubylibs=($RUBYLIB)
+IFS=: perl5libs=($PERL5LIB)
# Scan through prefixes
for prefix in "${prefixes[@]}"; do
# PATH
- dir="$prefix/bin"
- if [[ -d "$dir" ]] && ! in_array "$dir" "${paths[@]}"; then
- paths=("$dir" "${paths[@]}")
+ for dir in "$prefix/bin" "$prefix/sbin"; do
+ if [[ -d "$dir" ]] && ! in_array "$dir" "${paths[@]}"; then
+ paths=("$dir" "${paths[@]}")
+ fi
+ done
+ # MANPATH
+ dir="$prefix/share/man"
+ if [[ -d "$dir" ]] && ! in_array "$dir" "${manpaths[@]}"; then
+ manpaths=("$dir" "${manpaths[@]}")
fi
# RUBYLIB
dir="$prefix/lib"
if [[ -d "$dir" ]] && ! in_array "$dir" "${rubylibs[@]}"; then
rubylibs=("$dir" "${rubylibs[@]}")
fi
+ # PERL5LIB
+ for dir in "$prefix"/lib*/perl5; do
+ if [[ -d "$dir" ]] && in_array "$dir" "${manpaths[@]}"; then
+ perl5libs=("$dir" "${perl5libs[@]}")
+ fi
+ done
done
# Finally, print our values
IFS=: PATH="${paths[*]}"
+IFS=: MANPATH="${manpaths[*]}"
IFS=: RUBYLIB="${rubylibs[*]}"
+IFS=: PERL5LIB="${perl5libs[*]}"
# The sed bit here is the only time we call an external program
{
declare -p PATH
+ declare -p MANPATH
declare -p RUBYLIB
+ declare -p PERL5LIB
} | sed 's/^declare \(-\S* \)*//'
diff --git a/.local/bin/config-symlinks b/.local/bin/config-symlinks
index 0831ca3..7d889f0 100755
--- a/.local/bin/config-symlinks
+++ b/.local/bin/config-symlinks
@@ -1,6 +1,8 @@
#!/bin/bash
-sed -e '/^\s*$/d' -e '/#/d' symlinks | while read _target _link; do
+declare -i ret=0
+
+while read _target _link; do
target="$(sed -rn 's|[^/]+/|../|g;s|/[^/]+$|/|p' <<<"$_link")${_target}"
link="$HOME/$_link"
if [[ -L "$link" ]]; then
@@ -8,8 +10,11 @@ sed -e '/^\s*$/d' -e '/#/d' symlinks | while read _target _link; do
fi
if [[ -e "$link" ]]; then
echo "ERROR: file exists: $link" >> /dev/stderr
+ ret=1
else
mkdir -p "${link%/*}"
ln -s "$target" "$link"
fi
-done
+done < <(sed -e '/^\s*$/d' -e '/#/d' "$XDG_CONFIG_HOME/symlinks")
+
+exit $ret
diff --git a/.local/bin/cronic b/.local/bin/cronic
new file mode 100755
index 0000000..8536f29
--- /dev/null
+++ b/.local/bin/cronic
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# Cronic v2 - cron job report wrapper
+# Copyright 2007 Chuck Houpt. No rights reserved, whatsoever.
+# Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+set -eu
+
+OUT=/tmp/cronic.out.$$
+ERR=/tmp/cronic.err.$$
+TRACE=/tmp/cronic.trace.$$
+
+set +e
+"$@" >$OUT 2>$TRACE
+RESULT=$?
+set -e
+
+PATTERN="^${PS4:0:1}\\+${PS4:1}"
+if grep -aq "$PATTERN" $TRACE
+then
+ ! grep -av "$PATTERN" $TRACE > $ERR
+else
+ ERR=$TRACE
+fi
+
+if [ $RESULT -ne 0 -o -s "$ERR" ]
+ then
+ echo "Cronic detected failure or error output for the command:"
+ echo "$@"
+ echo
+ echo "RESULT CODE: $RESULT"
+ echo
+ echo "ERROR OUTPUT:"
+ cat "$ERR"
+ echo
+ echo "STANDARD OUTPUT:"
+ cat "$OUT"
+ if [ $TRACE != $ERR ]
+ then
+ echo
+ echo "TRACE-ERROR OUTPUT:"
+ cat "$TRACE"
+ fi
+fi
+
+rm -f "$OUT"
+rm -f "$ERR"
+rm -f "$TRACE"
diff --git a/.login b/.login
new file mode 100644
index 0000000..1a170f5
--- /dev/null
+++ b/.login
@@ -0,0 +1,6 @@
+# this file is processed only when csh is running as a login (top-level) shell
+# and should contain commands to be run once per session, e.g. setting
+# environment variables and terminal-specific settings
+
+setenv EDITOR vi
+setenv PAGER less