Run all *.tmux plugin files as executables
This commit is contained in:
parent
aee1fbc949
commit
c897f36e3d
2 changed files with 9 additions and 4 deletions
|
@ -1,4 +1,7 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
### master
|
||||||
|
- run all *.tmux plugin files as executables
|
||||||
|
|
||||||
### v0.0.1, 2014-05-21
|
### v0.0.1, 2014-05-21
|
||||||
- get TPM up and running
|
- get TPM up and running
|
||||||
|
|
|
@ -4,13 +4,15 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
source "$CURRENT_DIR/shared_functions.sh"
|
source "$CURRENT_DIR/shared_functions.sh"
|
||||||
|
|
||||||
# Sources all *.tmux files from the plugin directory.
|
# Runs all *.tmux files from the plugin directory.
|
||||||
# Files are sourced as tmux config files, not as shell scripts!
|
# Files are ran as executables.
|
||||||
# No errors if the plugin dir does not exist.
|
# No errors if the plugin dir does not exist.
|
||||||
silently_source_all_tmux_files() {
|
silently_source_all_tmux_files() {
|
||||||
local plugin_path=$1
|
local plugin_path=$1
|
||||||
for tmux_file in $plugin_path/*.tmux; do
|
local plugin_tmux_files="$plugin_path*.tmux"
|
||||||
tmux run-shell "source-file $tmux_file 2>&1 1>&/dev/null"
|
for tmux_file in $plugin_tmux_files; do
|
||||||
|
# runs *.tmux file as an executable
|
||||||
|
$tmux_file 2>&1 1>&/dev/null
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue