diff --git a/zsh/zsh.d/00-options b/zsh/zsh.d/00-options index e0c0069..8be6c31 100644 --- a/zsh/zsh.d/00-options +++ b/zsh/zsh.d/00-options @@ -1,14 +1,10 @@ setopt ALWAYS_TO_END setopt APPEND_HISTORY -setopt AUTO_CD -setopt ALL_EXPORT -setopt AUTO_MENU -setopt AUTO_LIST setopt AUTONAMEDIRS setopt AUTO_PARAM_SLASH setopt AUTO_REMOVE_SLASH setopt AUTO_RESUME -# setopt CDABLE_VARS +setopt CDABLE_VARS setopt CORRECT setopt FUNCTION_ARGZERO setopt HIST_IGNORE_ALL_DUPS @@ -16,11 +12,13 @@ setopt HIST_NO_STORE setopt HIST_REDUCE_BLANKS setopt LIST_TYPES setopt LONG_LIST_JOBS -# setopt MENU_COMPLETE -# setopt NO_AUTOLIST -setopt NO_BEEP -setopt NOHUP +setopt no_BEEP +setopt no_HUP setopt NOTIFY setopt PATH_DIRS setopt SHORT_LOOPS -# vim: set ts=4 sw=4 tw=0 ft=zsh : + +setopt AUTO_CD +setopt AUTO_MENU +setopt no_MENU_COMPLETE +setopt AUTO_LIST diff --git a/zsh/zsh.d/20-complete b/zsh/zsh.d/20-complete index 0d46cd3..7a4ecb6 100644 --- a/zsh/zsh.d/20-complete +++ b/zsh/zsh.d/20-complete @@ -1,19 +1,21 @@ ####################################################################################### # Start autocomplete -autoload -U compinit; compinit -# autoload -U compsys; -# compctl -g "*(-/)" + -g ".*(-/)" cd +# autoload -U compinit; compinit +autoload -U compsys; +compctl -g "*(-/)" + -g ".*(-/)" cd # allow approximate zstyle ':completion:*' completer _complete _match _approximate zstyle ':completion:*:match:*' original only zstyle ':completion:*:approximate:*' max-errors 1 numeric -# tab completion for PID :D +# # tab completion for PID :D zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:kill:*' force-list always -# cd not select parent dir +# # cd not select parent dir zstyle ':completion:*:cd:*' ignore-parents parent pwd +# compctl -g "*(-/)" + -g ".*(-/)" cd +# # vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh/zsh.d/30-aliases b/zsh/zsh.d/30-aliases index 4851b08..e2b6fa3 100644 --- a/zsh/zsh.d/30-aliases +++ b/zsh/zsh.d/30-aliases @@ -12,7 +12,7 @@ alias cls='clear' alias dc=cd alias les=less -alias fu='sudo -s $( fc -ln -1)' +alias fu='sudo $(fc -ln -1)' alias mkdir='mkdir -p' alias zap='rm -rf' diff --git a/zsh/zsh.d/30-less b/zsh/zsh.d/30-less index c06edbc..57ebfd4 100644 --- a/zsh/zsh.d/30-less +++ b/zsh/zsh.d/30-less @@ -19,4 +19,6 @@ LESS="-c -x4 -R -MM -PMFile\:?f%f:STDIN. ?BSize\:?B%B:Unk.?B\:?pb%pb\%:Unk.?B\:% LESSCHARSET=utf-8 READNULLCMD=/usr/bin/less PAGER=/usr/bin/less + +export LESS # vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh/zsh.d/Darwin/50-darwin b/zsh/zsh.d/Darwin/50-darwin index 7bdff49..93b3178 100644 --- a/zsh/zsh.d/Darwin/50-darwin +++ b/zsh/zsh.d/Darwin/50-darwin @@ -8,4 +8,7 @@ alias skill=killall alias lsrebuild='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user' alias ipython='ipython-2.6 ' +alias vim='/Applications/MacVim.app/Contents/MacOS/Vim' +alias mvim='mvim --remote-tab-silent ' + # vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh/zsh.d/Darwin/80-macportsDarwin b/zsh/zsh.d/Darwin/80-macportsDarwin new file mode 100644 index 0000000..31f2bc9 --- /dev/null +++ b/zsh/zsh.d/Darwin/80-macportsDarwin @@ -0,0 +1,6 @@ +# Mac Ports +if [ -f /opt/local/etc/init.sh ]; then + source /opt/local/etc/init.sh +fi + +# vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh/zsh.d/Darwin/90-coreutilsBrew b/zsh/zsh.d/Darwin/90-coreutilsBrew new file mode 100644 index 0000000..6dfc269 --- /dev/null +++ b/zsh/zsh.d/Darwin/90-coreutilsBrew @@ -0,0 +1,13 @@ +# Core Utils woth Brew +# + +ver=`brew info coreutils 2>/dev/null| head -1|cut -d" " -f2` +[ "$ver" = "" -o "$ver" = "No" ] && return 1 + +if [ -f /etc/zsh/gdircolors ]; then + eval `gdircolors /etc/zsh/gdircolors` +else + eval `gdircolors` +fi +source /usr/local/Cellar/coreutils/$ver/aliases +#alias ls='ls -F -G' # We use OSX ls 'cause it shows extended attrs diff --git a/zsh/zsh.d/Darwin/90-coreutilsMacports b/zsh/zsh.d/Darwin/90-coreutilsMacports new file mode 100644 index 0000000..8514404 --- /dev/null +++ b/zsh/zsh.d/Darwin/90-coreutilsMacports @@ -0,0 +1,19 @@ +# Core Utils +which gcp > /dev/null +if [ $? -eq 0 ]; then + if [ -f /etc/zsh/gdircolors ]; then + eval `gdircolors /etc/zsh/gdircolors` + else + eval `gdircolors` + fi + #alias ls='gls --color -F' # OSX ls is better (supports extended attributes) + alias ll='ls -l' + alias la='ls -a' + alias cp='gcp' + alias mv='gmv' + alias rm='grm' + alias du='gdu' + alias df='gdf -a' +fi + +# vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh/zsh.d/Linux/50-linux b/zsh/zsh.d/Linux/50-linux index e778ca4..88d1ba8 100644 --- a/zsh/zsh.d/Linux/50-linux +++ b/zsh/zsh.d/Linux/50-linux @@ -1,4 +1,8 @@ # Linux -eval `dircolors` +if [ -f /etc/dir_colors ]; then + eval `dircolors /etc/dir_colors` +else + eval `dircolors` +fi # vim: set ts=4 sw=4 tw=0 ft=zsh : diff --git a/zsh/zshrc b/zsh/zshrc index b3bd6da..8536e8e 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -12,7 +12,7 @@ KERNLIB="${LIBRARY}/${KERNEL}" function loadRC { if [ -d $1 ]; then - for zshFile in $1/*; do + for zshFile in $1/*[^~]; do . $zshFile done fi