]> git.draconx.ca Git - zshconf.git/commitdiff
Merge config from original install.
authorNick Bowler <nbowler@draconx.ca>
Fri, 24 Apr 2009 04:36:59 +0000 (00:36 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 24 Apr 2009 04:36:59 +0000 (00:36 -0400)
zlogout [new file with mode: 0644]
zprofile
zshrc [new file with mode: 0644]

diff --git a/zlogout b/zlogout
new file mode 100644 (file)
index 0000000..5b4f8bb
--- /dev/null
+++ b/zlogout
@@ -0,0 +1 @@
+clear
index 73a7cf83d0f4113d55a6cd3854d97b13f80051e0..2a4978d9bc591a49cfc67bb8430263d517e0b516 100644 (file)
--- a/zprofile
+++ b/zprofile
@@ -9,7 +9,7 @@ fi
 
 # You should override these in your ~/.zprofile (or equivalent) for per-user
 # settings.  For system defaults, you can add a new file in /etc/profile.d/.
-export EDITOR=${EDITOR:-/bin/nano}
+export EDITOR=${EDITOR:-/usr/bin/vim}
 export PAGER=${PAGER:-/usr/bin/less}
 
 # 077 would be more secure, but 022 is generally quite realistic
@@ -28,7 +28,7 @@ if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
 else
        PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
 fi
-export PATH
+export PATH="$HOME/bin:$PATH"
 unset ROOTPATH
 
 shopts=$-
@@ -39,3 +39,9 @@ done
 unsetopt nullglob
 set -$shopts
 unset sh shopts
+
+# Setup colours
+eval `dircolors --sh /etc/DIR_COLORS`
+if [[ -n "$LS_COLORS" && -z "$COLORTERM" ]]; then
+       export COLORTERM="ansi"
+fi
diff --git a/zshrc b/zshrc
new file mode 100644 (file)
index 0000000..130e70c
--- /dev/null
+++ b/zshrc
@@ -0,0 +1,73 @@
+if [ -n "$HOME" ]; then
+       HISTFILE="$HOME/.zsh_history"
+       SAVEHIST=1000
+fi
+HISTSIZE=1000
+
+bindkey -e
+
+case "$TERM" in
+rxvt*)
+       if [ "$TERM" = "rxvt-unicode" ]; then
+               [ -z "$COLORTERM" ] && export COLORTERM="rxvt-xpm"
+               [ -z "$COLORFGBG" ] && export COLORFGBG="15;default;0"
+       fi
+
+       bindkey '\e[3~' delete-char
+       bindkey '\e[8~' end-of-line
+       bindkey '\e[7~' beginning-of-line
+;;
+screen*|linux)
+       bindkey '\e[3~' delete-char
+       bindkey '\e[4~' end-of-line
+       bindkey '\e[1~' beginning-of-line
+;;
+xterm)
+       bindkey '\e[3~' delete-char
+       bindkey '\e[F' end-of-line
+       bindkey '\e[H' beginning-of-line
+       bindkey '\eOH' beginning-of-line
+       bindkey '\eOF' end-of-line
+;;
+esac
+
+# Set the xterm title
+case "$TERM" in
+        xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
+                settitle() { print -Pn $'\e]0;%n@%m %33<...<%~%<<\a' }
+                ;;
+        screen)
+                settitle() { print -Pn $'\e_%n@%m %33<...<%~%<<\e\\' }
+                ;;
+       *)
+               settitle() { }
+               ;;
+esac
+
+precmd() {
+       settitle
+
+       if [[ -n "$__NEWRUN" ]]; then
+               RPS1=$'%(0?,,%{\e[31;1m%}RC=%?%{\e[0m%})'
+               unset __NEWRUN
+       else
+               unset RPS1
+       fi
+}
+
+preexec() {
+       __NEWRUN=yes
+}
+
+if [ -n "$COLORTERM" ]; then
+       PS1=$'%(!,%{\e[31;1m%},%{\e[32;1m%}%n@)%m%{\e[34;1m%} %33<...<%~%<< %#%{\e[0m%} '
+
+       # Random colour-related options
+       export MINICOM="-c on"
+else
+       PS1='%n@%m %33<...<%~%<< %# '
+fi
+
+if [[ -n "$SSH_CONNECTION" ]]; then
+       PS1="${PS1/\[32/[33}"
+fi