Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
.zshrc zsh environment settings
date '+%Y/%m/%d %H:%M:%S'
# history
## prompt settings
# autoload colors
# colors
# PROMPT="%{${fg[green]}%}[%n@%m] %(!.#.$) %{${reset_color}%}"
# PROMPT2="%{${fg[green]}%}%_> %{${reset_color}%}"
# SPROMPT="%{${fg[red]}%}correct: %R -> %r [nyae]? %{${reset_color}%}"
# RPROMPT="%{${fg[green]}%}[%~]%{${reset_color}%}"
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
nprom () {
setopt prompt_subst
local rbase=$'%{\e[33m%}[%~]%{\e[m%}' lf=$'\n'
local pct=$'%0(?||%18(?||%{\e[31m%}))%#%{\e[m%}'
case "$USER" in
yatex)yatexPROMPT=$'%{\e[33m%}%U%m{%n}%%%{\e[m%}%u ' ;;
java)javaPROMPT=$'%{\e[36m%}%U%m{%n}%%%{\e[m%}%u ' ;;
local pbase=$'%{\e[$[32+RANDOM%5]m%}%U%B%m{%n}%b'"$pct%u "
[[ "$TERM" = "screen" ]] && RPROMPT="[%U%~%u]"
export GREP_COLOR='01;36'
export GREP_OPTIONS='--color=auto'
export LSCOLORS=gxfxcxdxbxegedabagacad
# export LSCOLORS=exfxcxdxbxegedabagacad
alias ls='ls -G'
alias ll='ls -al'
alias la='ls -alrt'
alias l='ls -aF'
alias h='history 50'
alias cl='clear'
alias diskm='diskutil mount'
alias disku='diskutil unmount'
alias k='kill'
alias kd='killall Dock'
alias kf='killall Finder'
alias ks='killall SystemUIServer'
alias kk='killall Kotoeri'
alias o='open'
alias co='open -a /Applications/Editor/CotEditor/'
alias xcode='open -a /Developer/Applications/ ./*.xcodeproj'
alias ib='open -a /Developer/Applications/Interface\'
alias xls='open -a /Applications/'
alias x='exit'
alias s='screen'
alias d='du -sx /'
alias p='ping'
alias tr='traceroute'
# development environment
alias adb='/Developer-old/AndroidSDK/android-sdk-mac_x86/platform-tools/adb'
export LANG=ja_JP.UTF-8
export PATH=/usr/bin:/opt/local/bin/:opt/local/sbin:/opt/local/bin:$PATH
export MANPATH=/usr/local/share/man:/usr/local/man:/usr/share/man
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib
export GIT=~/DropBox/git-repos
# zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin
# zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' '+m:{A-Z}={a-z}'
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z} r:|[-_.]=**'
zstyle ':completion:*' menu select=1
# compdef -d cd
autoload -Uz compinit
compinit -u
setopt auto_pushd
unsetopt AUTO_MENU
setopt auto_menu
setopt auto_param_keys
setopt auto_param_slash
setopt no_beep
setopt mark_dirs
setopt print_eight_bit
# setopt complete_aliases
export LS_COLORS='di=01;36'
# zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# function chpwd() {ls -aF --color=auto}
function dealloc() {
du -sx / &> /dev/null & sleep 10 && kill $!
function doc {
cd ~/Documents;
function dl {
cd ~/Downloads;
function app {
cd ~/Applications/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment