From c897f36e3d1573d796cb94c9a714f98d156c9310 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Thu, 22 May 2014 12:26:04 +0200 Subject: [PATCH] Run all *.tmux plugin files as executables --- CHANGELOG.md | 3 +++ scripts/source_plugins.sh | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b77a2c3..2e1df09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +### master +- run all *.tmux plugin files as executables + ### v0.0.1, 2014-05-21 - get TPM up and running diff --git a/scripts/source_plugins.sh b/scripts/source_plugins.sh index 58cfce1..4a96ef7 100755 --- a/scripts/source_plugins.sh +++ b/scripts/source_plugins.sh @@ -4,13 +4,15 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "$CURRENT_DIR/shared_functions.sh" -# Sources all *.tmux files from the plugin directory. -# Files are sourced as tmux config files, not as shell scripts! +# Runs all *.tmux files from the plugin directory. +# Files are ran as executables. # No errors if the plugin dir does not exist. silently_source_all_tmux_files() { local plugin_path=$1 - for tmux_file in $plugin_path/*.tmux; do - tmux run-shell "source-file $tmux_file 2>&1 1>&/dev/null" + local plugin_tmux_files="$plugin_path*.tmux" + for tmux_file in $plugin_tmux_files; do + # runs *.tmux file as an executable + $tmux_file 2>&1 1>&/dev/null done }