|
|
@ -1,4 +1,17 @@ |
|
|
|
# The following lines were added by compinstall |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# .zshrc |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# User-specific ~/.zshrc, generalized for GNU/Linux and Apple OS X |
|
|
|
# Excecuted by zsh for interactive shells |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Tab completion settings (added by compinstall) |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
zstyle ':completion:*' auto-description 'Specify parameter: %d' |
|
|
|
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate |
|
|
@ -25,32 +38,37 @@ zstyle :compinstall filename '/home/djsissom/.zshrc' |
|
|
|
fpath=(~/.zsh $fpath) |
|
|
|
fpath=( "$HOME/.zsh/functions" $fpath ) |
|
|
|
autoload -Uz compinit && compinit |
|
|
|
# End of lines added by compinstall |
|
|
|
# Lines configured by zsh-newuser-install |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Shell behavior |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
HISTFILE=~/.histfile |
|
|
|
HISTSIZE=2500 |
|
|
|
SAVEHIST=2500 |
|
|
|
setopt appendhistory extendedglob nomatch notify |
|
|
|
unsetopt autocd beep |
|
|
|
bindkey -v |
|
|
|
bindkey "^?" backward-delete-char # fix backspacing over newlines |
|
|
|
bindkey '^R' history-incremental-pattern-search-backward # search |
|
|
|
bindkey '^F' history-incremental-pattern-search-forward # search |
|
|
|
# End of lines configured by zsh-newuser-install |
|
|
|
|
|
|
|
bindkey -v # emulate vi keybindings |
|
|
|
bindkey "^?" backward-delete-char # fix backspacing over newlines |
|
|
|
bindkey '^R' history-incremental-pattern-search-backward # search |
|
|
|
bindkey '^F' history-incremental-pattern-search-forward # search |
|
|
|
|
|
|
|
setopt HIST_IGNORE_DUPS |
|
|
|
setopt RM_STAR_SILENT |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#--------------- |
|
|
|
# create a zkbd compatible hash; |
|
|
|
# to add other keys to this hash, see: man 5 terminfo |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Create a zkbd compatible hash (see man 5 terminfo to add other keys) |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
typeset -A key |
|
|
|
|
|
|
|
key[Home]=${terminfo[khome]} |
|
|
|
|
|
|
|
key[End]=${terminfo[kend]} |
|
|
|
key[Insert]=${terminfo[kich1]} |
|
|
|
key[Delete]=${terminfo[kdch1]} |
|
|
@ -61,7 +79,6 @@ key[Right]=${terminfo[kcuf1]} |
|
|
|
key[PageUp]=${terminfo[kpp]} |
|
|
|
key[PageDown]=${terminfo[knp]} |
|
|
|
|
|
|
|
# setup key accordingly |
|
|
|
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line |
|
|
|
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line |
|
|
|
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode |
|
|
@ -73,8 +90,8 @@ key[PageDown]=${terminfo[knp]} |
|
|
|
[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history |
|
|
|
[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history |
|
|
|
|
|
|
|
# Finally, make sure the terminal is in application mode, when zle is |
|
|
|
# active. Only then are the values from $terminfo valid. |
|
|
|
# Finally, make sure the terminal is in application mode, when zle is active. |
|
|
|
# Only then are the values from $terminfo valid. |
|
|
|
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then |
|
|
|
function zle-line-init () { |
|
|
|
printf '%s' "${terminfo[smkx]}" |
|
|
@ -85,18 +102,6 @@ if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then |
|
|
|
zle -N zle-line-init |
|
|
|
zle -N zle-line-finish |
|
|
|
fi |
|
|
|
#--------------- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# .zshrc |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# User-specific ~/.zshrc, generalized for GNU/Linux and Apple OS X |
|
|
|
# Excecuted by bash(1) for non-login shells |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -104,13 +109,17 @@ fi |
|
|
|
# Source external definitions |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
[ -r ~/.colornames ] && . ~/.colornames # Human-readable color variables |
|
|
|
autoload -U colors && colors |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Determine local environment |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
case $( uname ) in |
|
|
|
( *[Ll]inux* ) |
|
|
|
case "$HOSTNAME" in |
|
|
@ -123,10 +132,12 @@ case $( uname ) in |
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Import packages |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
if [[ $host == cluster ]]; then |
|
|
|
setpkgs -a gcc_compiler |
|
|
|
setpkgs -a intel_compiler |
|
|
@ -147,10 +158,12 @@ if [[ $host == cluster ]]; then |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Path definitions |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
typeset -U path |
|
|
|
|
|
|
|
case "$host" in |
|
|
@ -206,54 +219,69 @@ esac |
|
|
|
export path |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Shell behavior |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
if [[ $host == osx ]]; then |
|
|
|
export EDITOR='vim' # Use vim as default text editor |
|
|
|
else |
|
|
|
export EDITOR='vim -display none' # Use vim as default text editor |
|
|
|
fi |
|
|
|
export GPG_TTY=$(tty) # Fix GPG pin prompt bug with git |
|
|
|
export GPG_TTY=$(tty) # Fix GPG pin prompt bug with git |
|
|
|
export SDL_VIDEO_FULLSCREEN_HEAD=3 |
|
|
|
setopt HIST_IGNORE_SPACE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Source alias definitions file |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
[ -r ~/.aliases ] && . ~/.aliases |
|
|
|
setopt complete_aliases |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Program-specific settings and fixes |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
# make less more friendly for non-text input files, see lesspipe(1) |
|
|
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# User-defined functions |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
# Enable user-passable growl notifications |
|
|
|
growl() { echo -e $'\e]9;'${1}'\007' ; return ; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# End |
|
|
|
# Set up command line syntax highlighting plugin |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
zsh_hl_path=/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |
|
|
|
[ -r $zsh_hl_path ] && source $zsh_hl_path |
|
|
|
ZSH_HIGHLIGHT_HIGHLIGHTERS=(brackets root) # options: main brackets pattern cursor root line |
|
|
|
#ZSH_HIGHLIGHT_STYLES[unknown-token]='none' # example to customize main class tokens |
|
|
|
|
|
|
|
autoload -U colors && colors |
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# Set up prompt |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
autoload -Uz promptinit && promptinit |
|
|
|
PURE_GIT_PULL=0 |
|
|
@ -261,4 +289,6 @@ prompt pure |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
# End |
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |