summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-07-01 22:47:02 +0200
committerGravatar Tom Willemse2014-07-01 22:47:02 +0200
commit909786b42147ac5a19766260a17e92e599bed28b (patch)
tree313fbc1938d140a3f175c6c48364b57cc25c61d2
parentee2e7014084624f08aae3fe65c88b44fb53ee1bd (diff)
downloaddotfiles-909786b42147ac5a19766260a17e92e599bed28b.tar.gz
dotfiles-909786b42147ac5a19766260a17e92e599bed28b.zip
Update zshrc
-rw-r--r--zshrc34
1 files changed, 26 insertions, 8 deletions
diff --git a/zshrc b/zshrc
index 1d6f045..6eea812 100644
--- a/zshrc
+++ b/zshrc
@@ -12,8 +12,8 @@ autoload -U $HOME/.zsh/functions/*(:t)
HISTFILE=$HOME/.zsh/histfile
HISTSIZE=1000
SAVEHIST=1000
-LESSCMD="/usr/bin/less -FXRS"
+export LESS="iFXRS"
export LESS_TERMCAP_mb=$'\e[1;37m'
export LESS_TERMCAP_md=$'\e[1;37m'
export LESS_TERMCAP_me=$'\e[0m'
@@ -21,13 +21,12 @@ export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_so=$'\e[1;47;30m'
export LESS_TERMCAP_ue=$'\e[0m'
export LESS_TERMCAP_us=$'\e[0;36m'
-export PAGER=$LESSCMD
+export PAGER="less"
# Aliases
alias alpine="alpine -p ""{imap.gmail.com/ssl/user=tom.willemsen@archlinux.us}remote_pinerc"""
alias evolus-pencil="/usr/lib/evolus-pencil-svn/evolus-pencil.sh"
alias grep="grep --color=always"
-alias less=$LESSCMD
alias ls="ls -F --color=always"
alias mysql="mysql --pager"
alias sbcl="rlwrap sbcl"
@@ -36,12 +35,12 @@ alias sbcl="rlwrap sbcl"
alias -s pdf="zathura"
alias -s xls="libreoffice"
-setopt AUTO_CD
-setopt AUTO_PUSHD
-setopt CORRECT
-setopt EXTENDED_GLOB
-setopt NOTIFY
+setopt AUTO_PUSHD # Automatically add to directory stack
+setopt CORRECT # Offer to correct my mistakes
+setopt EXTENDED_GLOB # Add extra globbing patterns
+setopt NOTIFY # Don't wait to show status of jobs
setopt PROMPT_SUBST # Allow for functions in the prompt
+setopt HIST_IGNORE_ALL_DUPS # Don't story any duplicate commands
zstyle :compinstall filename '$HOME/.zshrc'
@@ -64,10 +63,24 @@ PROMPT='${vcs_info_msg_0_}
# Set terminal name to current running application
case $TERM in
+ eterm-color*)
+ # Make {{ansi,multi}-,}term change Emacs' `default-directory'
+ # and keep track of the current user and host.
+ precmd () { print -P "\eAnSiTu %n\n\eAnSiTc %~" }
+ ;;
rxvt*)
precmd () { print -Pn "\e]0;%~\a" }
preexec () { print -Pn "\e]0;$1\a" }
;;
+ screen)
+ # Make screen show the current running command as window title
+ # or the shell if no command is running. The running command
+ # is presented as the first sequence of characters without a
+ # space on the given command line, possibly prefixed with
+ # `sudo '.
+ preexec () { print -Pn "\ek$(basename $1 | sed -e 's/^\(\(sudo \)\?[^ ]\+\).*/\1/')\e\\" }
+ precmd () { print -Pn "\ek$(basename $SHELL)\e\\" }
+ ;;
esac
export XDG_CACHE_HOME="$HOME/.cache"
@@ -75,6 +88,7 @@ export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
zle -N emacs-backward-kill-word
+zle -N insert-sudo
# Set terminal keys
bindkey "\e[1~" beginning-of-line
@@ -101,6 +115,7 @@ bindkey "\e[F" end-of-line
bindkey "^W" backward-delete-char
bindkey "^\b" emacs-backward-kill-word
+bindkey "^[#" insert-sudo
source /usr/share/zsh/scripts/antigen/antigen.zsh
antigen bundle zsh-users/zsh-syntax-highlighting
@@ -131,3 +146,6 @@ fi
compinit
colors # Initialize colors.
+
+# Setup rbenv
+eval "$(rbenv init -)"