summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2016-03-09 09:21:32 -0800
committerFranck Cuny <franckcuny@gmail.com>2016-03-09 09:21:59 -0800
commit260ca7a284c188b8ad6adb2522f7b05dc32c7a7d (patch)
tree4bc5c5dc2aa73e681be0c1623d07318e3e91a399
parent[emacs] Twitter's style check report warnings too (diff)
downloademacs.d-260ca7a284c188b8ad6adb2522f7b05dc32c7a7d.tar.gz
[zsh] Add configuration for zsh
Basic configuration to start with zsh.

Closes #18.
-rw-r--r--Makefile6
-rw-r--r--aliases40
-rw-r--r--env9
-rw-r--r--zshenv7
-rw-r--r--zshrc19
5 files changed, 80 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index af99024..3b2f381 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,18 @@
 INTO    = $(HOME)
 
 INSTALL = \
+	  aliases \
 	  aspell.en.pws \
 	  bash_login \
 	  bash_logout \
 	  bashrc \
 	  emacs.d \
+	  env \
 	  gitconfig \
 	  gitignore \
-	  tmux.conf
+	  tmux.conf \
+	  zshenv \
+	  zshrc
 
 git:
 	git config --local user.email "franckcuny@gmail.com"
diff --git a/aliases b/aliases
new file mode 100644
index 0000000..eedc47a
--- /dev/null
+++ b/aliases
@@ -0,0 +1,40 @@
+# some aliases
+if [[ "${OSTYPE}" =~ "darwin" ]]; then
+  alias ls='ls -G'
+else
+  alias ls='ls --color'
+fi
+
+# editor
+alias e="$EDITOR"
+alias et="TERM=xterm-256color emacsclient -nw"
+
+# generic commands
+alias cp="cp -i"
+alias l="ls"
+alias la="ls -a"
+alias ll="ls -lh"
+alias lt="ls -lhtr"
+alias mv="mv -i"
+alias rm="rm -i"
+alias utc="date -u"
+
+# tools
+alias tmux="tmux new-session -A -s work"
+alias gerp="grep --color=auto"
+alias grep="grep --color=auto"
+alias pjson="python -mjson.tool"
+
+# git
+alias g="git"
+alias gclean="git clean -dfx"
+alias gst="git status"
+
+# navigation
+alias s="cd ~/src/source"
+alias eb="cd ~/src/source/eventbus"
+alias ops="cd ~/src/twitter-ops"
+alias science="cd ~/src/source/science/"
+
+# zsh stuff
+alias zshrc="source ~/.zshrc"
diff --git a/env b/env
new file mode 100644
index 0000000..c840045
--- /dev/null
+++ b/env
@@ -0,0 +1,9 @@
+export EDITOR="emacsclient -a ''"
+export HISTFILE=
+export LANG="en_US.UTF-8"
+export LC_ALL="$LANG"
+export LC_CTYPE="$LANG"
+export PAGER="less"
+export TMPDIR="${HOME}/tmp"
+export TZ=America/Los_Angeles
+export GOPATH="${HOME}"
diff --git a/zshenv b/zshenv
new file mode 100644
index 0000000..f387203
--- /dev/null
+++ b/zshenv
@@ -0,0 +1,7 @@
+source ~/.env
+
+# enable auto completion - This is stupid, this should be in .zshrc
+autoload -U compinit
+compinit -C
+
+source ~/.bash_local
diff --git a/zshrc b/zshrc
new file mode 100644
index 0000000..04000f3
--- /dev/null
+++ b/zshrc
@@ -0,0 +1,19 @@
+# This is for the interactive shell
+
+# enable colors
+autoload -U colors
+colors
+
+# I want word boundary to be similar to bash
+autoload -U select-word-style
+select-word-style bash
+
+# local ret_status="%{$reset_color%}[%(?:%{$fg_bold[green]%}$?:%{$fg_bold[red]%}$?)%{$reset_color%}]"
+PROMPT="%1~ %# "
+# RPROMPT="${ret_status}"
+
+# load custom aliases
+source ~/.aliases
+
+# emacs style
+bindkey -e