summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2015-07-16 09:07:00 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2015-07-16 09:07:00 -0400
commit34f49197cdf0882a5f1e6312c841818612bfdd4a (patch)
tree499b48df315947110ca5dc8bcea05ff1fdcf610e /zshrc
parent086be55a4327117a6d7a3216533781a5a49ff6b8 (diff)
parent26792463b3e1281cb3b58c8bfcb7d712d576f0e1 (diff)
Merge branch 'master' of home.orbekk.com:/storage/projects/dotfiles
Diffstat (limited to 'zshrc')
-rwxr-xr-xzshrc26
1 files changed, 21 insertions, 5 deletions
diff --git a/zshrc b/zshrc
index 9194c5e..509ac31 100755
--- a/zshrc
+++ b/zshrc
@@ -2,13 +2,17 @@
# ulimit -v 4194304 # 4G
# ulimit -u 1024
+if [[ -f $HOME/.zshrc.local ]]; then
+ source $HOME/.zshrc.local
+fi
+
source $HOME/dotfiles/zgen/zgen.zsh
# check if there's no init script
if ! zgen saved; then
echo "Creating a zgen save"
zgen oh-my-zsh
# plugins
- zgen oh-my-zsh plugins/git
+ # zgen oh-my-zsh plugins/git
zgen oh-my-zsh plugins/sudo
zgen oh-my-zsh plugins/history
zgen oh-my-zsh plugins/autojump
@@ -24,7 +28,10 @@ if ! zgen saved; then
zgen save
fi
+setopt extendedglob
LANG=en_US.UTF-8
+HISTSIZE=1000000
+SAVEHIST=1000000
if (( $+commands[ack-grep] )) ; then
alias ack=ack-grep
@@ -44,10 +51,6 @@ fi
alias ff="fileutil --gfs_user=gfp-reporting"
alias diff=colordiff
-if [[ -f $HOME/.zshrc.local ]]; then
- source $HOME/.zshrc.local
-fi
-
export EDITOR=vim
export PAGER=less
export TZ='America/New_York'
@@ -57,3 +60,16 @@ export PATH=$HOME/bin:$PATH
autoload -U edit-command-line
zle -N edit-command-line
bindkey "^V" edit-command-line
+
+function get-parent-dir() {
+ words=(${(z)LBUFFER})
+ if [[ "${words[${#words}]}" = /* ]]; then
+ # There is already a path thing here.
+ words[${#words}]="${words[${#words}]:h}/" # Parent directory.
+ else
+ words=($words $PWD)
+ fi
+ LBUFFER="${words[@]}"
+}
+zle -N get-parent-dir
+bindkey "^[u" get-parent-dir