From 9c883ec51610ed78c03b6c3475da920aa8e0059a Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:23:44 +0800 Subject: [PATCH] Add key descriptions in a separate command This will allow the key binding to succeed on older versions of tmux while adding a description for users with a new enough version. Co-authored-by: eggbean <815311+eggbean@users.noreply.github.com> --- tpm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tpm b/tpm index 23b3b99..312829d 100755 --- a/tpm +++ b/tpm @@ -58,13 +58,16 @@ source_plugins() { # prefix + alt + u - remove unused TPM plugins and reloads TMUX environment set_tpm_key_bindings() { local install_key="$(get_tmux_option "$install_key_option" "$default_install_key")" - tmux bind-key -N 'Install tpm-managed plugins' "$install_key" run-shell "$BINDINGS_DIR/install_plugins" + tmux bind-key "$install_key" run-shell "$BINDINGS_DIR/install_plugins" + tmux bind-key -N 'Install tpm-managed plugins' "$install_key" local update_key="$(get_tmux_option "$update_key_option" "$default_update_key")" - tmux bind-key -N 'Update tpm-managed plugins' "$update_key" run-shell "$BINDINGS_DIR/update_plugins" + tmux bind-key "$update_key" run-shell "$BINDINGS_DIR/update_plugins" + tmux bind-key -N 'Update tpm-managed plugins' "$update_key" local clean_key="$(get_tmux_option "$clean_key_option" "$default_clean_key")" - tmux bind-key -N 'Remove plugins not listed in .tmux.conf' "$clean_key" run-shell "$BINDINGS_DIR/clean_plugins" + tmux bind-key "$clean_key" run-shell "$BINDINGS_DIR/clean_plugins" + tmux bind-key -N 'Remove plugins not listed in .tmux.conf' "$clean_key" } supported_tmux_version_ok() {