summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-04-25 15:31:26 +0200
committerAlan Pearce2017-04-25 15:31:26 +0200
commit183364854a7c61eb2d46c5536926b707ec2cf2c1 (patch)
tree2cb952999787ecc1761d083c3969e33d55b22930
parentc25428de28d56b9d0c7c271380d6cfc1cc84fcf8 (diff)
downloadnixfiles-183364854a7c61eb2d46c5536926b707ec2cf2c1.tar.lz
nixfiles-183364854a7c61eb2d46c5536926b707ec2cf2c1.tar.zst
nixfiles-183364854a7c61eb2d46c5536926b707ec2cf2c1.zip
zsh: Add hashed directories for GHQ_ROOT and GOPATH
-rw-r--r--zsh/.config/zsh/.zshrc4
1 files changed, 4 insertions, 0 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index 207bff79..23f852e1 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/zsh/.config/zsh/.zshrc
@@ -112,6 +112,10 @@ ds () {
   du -hd1 $1 | sort -h
 }
 
+# returns the first ghq root, whereas $GHQ_ROOT returns all
+hash -d p=$(ghq root)
+hash -d go=${GOPATH:-$HOME/go}
+
 zle -C hist-complete complete-word _generic
 zstyle ':completion:hist-complete:*' completer _history
 bindkey '\e ' hist-complete