From 839d9ada354274b9a0f31d3ad202bba5c944b135 Mon Sep 17 00:00:00 2001 From: Bin Date: Tue, 24 Jan 2017 11:29:56 -0800 Subject: [PATCH] initial zetup --- runcoms/zpreztorc | 12 ++++++++---- runcoms/zprofile | 24 ++++++++++++++++++++++-- runcoms/zshrc | 35 ++++++++++++++++++++++++++++------- 3 files changed, 58 insertions(+), 13 deletions(-) diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index e93ac6bf..7e3d309e 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -32,7 +32,11 @@ zstyle ':prezto:load' pmodule \ 'spectrum' \ 'utility' \ 'completion' \ - 'prompt' + 'git' \ + 'node' \ + 'prompt' \ + 'syntax-highlighting' \ + 'history-substring-search' # # Autosuggestions @@ -143,13 +147,13 @@ zstyle ':prezto:module:prompt' theme 'sorin' # # Auto set the tab and window titles. -# zstyle ':prezto:module:terminal' auto-title 'yes' +zstyle ':prezto:module:terminal' auto-title 'yes' # Set the window title format. -# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' +zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' # Set the tab title format. -# zstyle ':prezto:module:terminal:tab-title' format '%m: %s' +zstyle ':prezto:module:terminal:tab-title' format '%m: %s' # # Tmux diff --git a/runcoms/zprofile b/runcoms/zprofile index d87cb3b0..7d09723f 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -17,8 +17,8 @@ fi # Editors # -export EDITOR='nano' -export VISUAL='nano' +export EDITOR="code -n" +export VISUAL="code -n" export PAGER='less' # @@ -29,6 +29,24 @@ if [[ -z "$LANG" ]]; then export LANG='en_US.UTF-8' fi + +# +# Others +# +export MYSRC=$HOME/src +export MYSW=$HOME/sw +export MYSCRIPTS=$MYSRC/scripts + +# AWS +export AWS_DEFAULT_REGION=us-west-2 + +# GO +export GOROOT=/usr/local/go +export GOPATH=$MYSRC/gopath + +# java +export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home + # # Paths # @@ -45,6 +63,8 @@ typeset -gU cdpath fpath mailpath path path=( /usr/local/{bin,sbin} $path + $GOPATH/bin + $MYSCRIPTS ) # diff --git a/runcoms/zshrc b/runcoms/zshrc index 039b882d..79df90e6 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -1,13 +1,34 @@ -# -# Executes commands at the start of an interactive session. -# -# Authors: -# Sorin Ionescu -# - # Source Prezto. if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi +############################ # Customize to your needs... +############################ +export PSQL_EDITOR="vi" + +export KAFKA09=$MYSW/kafka +export HADOOP_HOME=/usr/local/opt/hadoop/libexec/etc/hadoop +export HIVE_HOME=/usr/local/opt/hive/libexec +export HCAT_HOME=/usr/local/opt/hive/libexec/hcatalog +export HOMEBREW_CASK_OPTS=--caskroom=/opt/homebrew-cask/Caskroom + +# node +export NVM_DIR="$HOME/.nvm" + +# alias +alias sz='source ~/.zshrc' +alias ez='code -n ~/.zprezto/' + +alias cdsrc='cd $MYSRC' +alias cdsw='cd $MYSW' +alias cdscript='cd $MYSCRIPTS' +alias cdapi='cd $MYSRC/api-server && nvm use' +alias cdevent-sink='cd $MYSRC/event-sink' +alias cdui='cd $MYSRC/ui' +alias cdkafka='cd $KAFKA09' +alias cdspark='cd $MYSW/spark' + +source $MYSCRIPTS/appuri.env +source $MYSCRIPTS/api-server.env