From 3106e4294ef098910a742a30916a21bc6df00f22 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Wed, 19 Nov 2014 11:12:10 +1300 Subject: [PATCH] Fix unexpanded glob case --- scripts/source_plugins.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/source_plugins.sh b/scripts/source_plugins.sh index cc45439..0cb2286 100755 --- a/scripts/source_plugins.sh +++ b/scripts/source_plugins.sh @@ -16,6 +16,9 @@ silently_source_all_tmux_files() { local plugin_tmux_files="$plugin_path*.tmux" if plugin_dir_exists "$plugin_path"; then for tmux_file in $plugin_tmux_files; do + # if the glob didn't find any files this will be the + # unexpanded glob which obviously doesn't exist + [ -f "$tmux_file" ] || continue # runs *.tmux file as an executable $tmux_file >/dev/null 2>&1 done