summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAlan Pearce2019-10-05 05:50:05 +0200
committerAlan Pearce2019-10-05 05:50:05 +0200
commitec5b022828abaef4bcc5bad45c569e2b70fbf733 (patch)
tree942531a4412b504cd68fd101b5ae2ba1dfb44c75 /user
parent3c341998089f783680446aa0bed2322102d5ec7a (diff)
downloadnixfiles-ec5b022828abaef4bcc5bad45c569e2b70fbf733.tar.lz
nixfiles-ec5b022828abaef4bcc5bad45c569e2b70fbf733.tar.zst
nixfiles-ec5b022828abaef4bcc5bad45c569e2b70fbf733.zip
Optimise zsh startup
Diffstat (limited to 'user')
-rw-r--r--user/modules/zsh.nix1
-rw-r--r--user/zsh/.config/zsh/.zshrc4
2 files changed, 2 insertions, 3 deletions
diff --git a/user/modules/zsh.nix b/user/modules/zsh.nix
index 89faa1a8..adbcaad0 100644
--- a/user/modules/zsh.nix
+++ b/user/modules/zsh.nix
@@ -91,6 +91,7 @@
         EMAIL=alan@alanpearce.eu
       fi
 
+      typeset -T GHQ_ROOT ghq_root
       export GHQ_ROOT="$HOME/projects:$HOME/go/src:$HOME/quicklisp/local-projects"
     '' + builtins.readFile ../zsh/.config/zsh/.zshrc;
   };
diff --git a/user/zsh/.config/zsh/.zshrc b/user/zsh/.config/zsh/.zshrc
index 7dd938e2..9d7ef9f7 100644
--- a/user/zsh/.config/zsh/.zshrc
+++ b/user/zsh/.config/zsh/.zshrc
@@ -1,7 +1,5 @@
 # -*- mode: sh; -*-
 source $HOME/.zplugin/bin/zplugin.zsh
-autoload -Uz _zplugin
-(( ${+_comps} )) && _comps[zplugin]=_zplugin
 
 setopt inc_append_history_time
 setopt transient_rprompt
@@ -114,7 +112,7 @@ ds () {
 }
 
 # returns the first ghq root, whereas $GHQ_ROOT returns all
-hash -d p=$(ghq root)
+hash -d p=$ghq_root[0]
 hash -d go=${GOPATH:-$HOME/go}
 
 zle -C hist-complete complete-word _generic