Permalink
Browse files

Make check_env_files always reliably run.

  • Loading branch information...
1 parent 681ae8f commit 751b319d86c1c1ece81a5418ffb702b0def8bfda @jgarvin committed Mar 26, 2012
Showing with 10 additions and 2 deletions.
  1. +6 −2 shell/fancy-prompt
  2. +4 −0 shell/zshrc
View
@@ -31,7 +31,7 @@ get_git_prompt_info() {
echo $__CURRENT_GIT_BRANCH
}
-function precmd {
+function fancy_precmd {
local TERMWIDTH
(( TERMWIDTH = ${COLUMNS} - 1 ))
@@ -63,9 +63,11 @@ function precmd {
fi
}
+precmd_functions+='fancy_precmd'
+
setopt extended_glob
-preexec () {
+fancy_preexec () {
if [[ "$TERM" == "screen" ]]; then
local CMD=${1[(wr)^(*=*|sudo|-*)]}
echo -n "\ek$CMD\e\\"
@@ -76,6 +78,8 @@ preexec () {
esac
}
+preexec_functions+='fancy_preexec'
+
setprompt () {
###
# Need this so the prompt will work.
View
@@ -1,6 +1,8 @@
#!/usr/bin/env zsh
typeset -ga chpwd_functions
+typeset -ga preexec_functions
+typeset -ga precmd_functions
if [[ "$ZDOTDIR" = "" ]]; then
export ZDOTDIR=~
@@ -348,3 +350,5 @@ check_env_files()
}
chpwd_functions+='check_env_files'
+preexec_functions+='check_env_files'
+precmd_functions+='check_env_files'

0 comments on commit 751b319

Please sign in to comment.