From 69f744117ac5c97eb0f8f3481546974180174260 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Thu, 11 Nov 2021 18:56:11 +0100 Subject: [PATCH] updated tpm integration to display a message when one or more plugin(s) fails to run, closes #533 --- .tmux.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index 7affd11..3e3bdca 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1362,6 +1362,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # perl -0777 -p -i -e 's/git clone/git clone --depth 1/g # ;s/(install_plugin "\$plugin")\n(\s+)done/\1&\n\2done\n\2wait/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/install_plugins.sh"& # perl -p -i -e 's/git submodule update --init --recursive/git submodule update --init --recursive --depth 1/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/update_plugin.sh"& +# perl -p -i -e 's,\$tmux_file\s+>/dev/null\s+2>\&1,$& || { tmux display "Plugin \$(basename \${plugin_path}) failed" && false; },' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/source_plugins.sh"& # wait # tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH" # fi @@ -1383,7 +1384,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # [ -z "$(tmux show -gqv '@tpm-install')" ] && tmux set -g '@tpm-install' 'I' # [ -z "$(tmux show -gqv '@tpm-update')" ] && tmux set -g '@tpm-update' 'u' # [ -z "$(tmux show -gqv '@tpm-clean')" ] && tmux set -g '@tpm-clean' 'M-u' -# [ -f "$TMUX_PLUGIN_MANAGER_PATH/tpm/tpm" ] && "$TMUX_PLUGIN_MANAGER_PATH/tpm/tpm" +# [ -f "$TMUX_PLUGIN_MANAGER_PATH/tpm/tpm" ] && "$TMUX_PLUGIN_MANAGER_PATH/tpm/tpm" || tmux display "One or more tpm plugin(s) failed" # if [ $_tmux_version -gt 260 ]; then # tmux set -gu '@tpm-install' \; set -gu '@tpm-update' \; set -gu '@tpm-clean' \; set -gu '@plugin' # fi