From 1a25c5cb00c59e326f7c8e88fd2dd2bfdb91ff4d Mon Sep 17 00:00:00 2001 From: Franklin Yu Date: Tue, 3 Jan 2023 23:24:42 -0800 Subject: [PATCH 1/2] =?UTF-8?q?Support=20comma=20as=20delimiter=20for=20?= =?UTF-8?q?=E2=80=9C@tpm=5Fplugins=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note that empty elements will be ignored. --- scripts/helpers/plugin_functions.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/helpers/plugin_functions.sh b/scripts/helpers/plugin_functions.sh index f33d215..683cd1e 100644 --- a/scripts/helpers/plugin_functions.sh +++ b/scripts/helpers/plugin_functions.sh @@ -70,7 +70,10 @@ tpm_path() { tpm_plugins_list_helper() { # lists plugins from @tpm_plugins option - echo "$(tmux start-server\; show-option -gqv "$tpm_plugins_variable_name")" + local plugins + plugins="$(tmux start-server\; show-option -gqv "$tpm_plugins_variable_name")" + plugins="${plugins//,/ }" + echo "$plugins" # read set -g @plugin "tmux-plugins/tmux-example-plugin" entries _tmux_conf_contents "full" | From 51240eceb7c5948c3ccd1b0d7cbfc36b2f6b0b07 Mon Sep 17 00:00:00 2001 From: Franklin Yu Date: Thu, 6 Apr 2023 21:28:49 -0700 Subject: [PATCH 2/2] Improve comments upon request --- scripts/helpers/plugin_functions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/helpers/plugin_functions.sh b/scripts/helpers/plugin_functions.sh index 683cd1e..0f6a4db 100644 --- a/scripts/helpers/plugin_functions.sh +++ b/scripts/helpers/plugin_functions.sh @@ -69,9 +69,10 @@ tpm_path() { } tpm_plugins_list_helper() { - # lists plugins from @tpm_plugins option local plugins + # lists plugins from @tpm_plugins option plugins="$(tmux start-server\; show-option -gqv "$tpm_plugins_variable_name")" + # allow comma as a plugin separator plugins="${plugins//,/ }" echo "$plugins"