From cc1886725631fcebe7ed76a8897c1baa3927b3fe Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Thu, 18 Jun 2015 14:17:09 -0400 Subject: Save more history. --- zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'zshrc') diff --git a/zshrc b/zshrc index 3d57bcf..41ae7aa 100755 --- a/zshrc +++ b/zshrc @@ -8,7 +8,7 @@ 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 +24,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 -- cgit v1.2.3 From ab9a5d8939e7bf26af6da1b72b5ffc9dfd354ba0 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Tue, 23 Jun 2015 15:53:21 -0400 Subject: Load zshrc.local before plugin initialization. This is to allow zshrc.local to add things to fpath before compinit. --- zshrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'zshrc') diff --git a/zshrc b/zshrc index 41ae7aa..a5570a2 100755 --- a/zshrc +++ b/zshrc @@ -2,6 +2,10 @@ # 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 @@ -47,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' -- cgit v1.2.3 From 26792463b3e1281cb3b58c8bfcb7d712d576f0e1 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Mon, 6 Jul 2015 17:36:52 -0400 Subject: ZSH get-parent-dir. Supports this: $ cp M-u M-u M-u foo ./ As a substitute for: $ cp ../../../foo ./ --- zshrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'zshrc') diff --git a/zshrc b/zshrc index a5570a2..8db2a50 100755 --- a/zshrc +++ b/zshrc @@ -59,3 +59,16 @@ export TZ='America/New_York' 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 -- cgit v1.2.3