X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/a44bc338a8950ef75edd702e5902357a513ca783..e45b0db3d66ca9e041622db3d801d026fb4d3724:/.zsh/zshrc/00_varsetup diff --git a/.zsh/zshrc/00_varsetup b/.zsh/zshrc/00_varsetup index 88be748..7bc2a50 100644 --- a/.zsh/zshrc/00_varsetup +++ b/.zsh/zshrc/00_varsetup @@ -2,18 +2,30 @@ # # set up global variables used by the shell # -# Copyright © 1994–2008 martin f. krafft +# Copyright © 1994–2017 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # # Source repository: http://git.madduck.net/v/etc/zsh.git # # automatically remove duplicates from these arrays -typeset -gU path cdpath fpath manpath +typeset -gU path cdpath fpath manpath fignore # http://xanana.ucsc.edu/~wgscott/wordpress_new/wordpress/?p=12 typeset -ga preexec_functions typeset -ga precmd_functions typeset -ga chpwd_functions +__chpwd_run_first() +{ + [[ -n $__CHPWD_RUN_FIRST ]] || return + eval "$__CHPWD_RUN_FIRST" +} +chpwd_functions+=__chpwd_run_first + +# warn on accidental creation of global variables +# unset for now until we work out the corner cases, like warning about $reply +# and $HISTFILE or $REPORTTIME. +#setopt warn_create_global + # vim:ft=zsh