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
|
||||
|
||||
### master
|
||||
- run all *.tmux plugin files as executables
|
||||
|
||||
### v0.0.1, 2014-05-21
|
||||
- get TPM up and running
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue