X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=shell%2Fzsh%2Frc;h=0af99afb89db0be411dbaab526d462c16d5d6e08;hb=8800a6c2fd5b1025a0441ecaa0dd108c78f66eb7;hp=7222619ca0b86c08de528ba30bc082951f3174a2;hpb=dcd322819bcff59f34bde4a4a82e4d20afb1b1d6;p=config%2Fdotfiles.git diff --git a/shell/zsh/rc b/shell/zsh/rc index 7222619..0af99af 100644 --- a/shell/zsh/rc +++ b/shell/zsh/rc @@ -1,6 +1,6 @@ # Zsh configuration file. -# Copyright (C) 2011-2014 Simon Ruderich +# Copyright (C) 2011-2018 Simon Ruderich # # This file is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -108,8 +108,10 @@ fi # functions). fpath=(~/.zsh/functions $fpath) # Autoload my functions (except completion functions and hidden files). Thanks -# to caphuso from the Zsh example files for this idea. -if [[ -d ~/.zsh/functions ]]; then +# to caphuso from the Zsh example files for this idea. Check if there are any +# functions to load or autoload fails; thanks to okdana in #zsh on Freenode +# (2018-07-18 09:29 CEST) for the idea to use (#qNY1) for the check. +if [[ -d ~/.zsh/functions && -n ${fpath[1]}/^_*(#qNY1^/:t) ]]; then autoload -Uz ${fpath[1]}/^_*(^/:t) fi