From 3c4a8c9eee8485dce29e2be2bd45415f3cfc0379 Mon Sep 17 00:00:00 2001 From: Graham McGregor Date: Sat, 12 Nov 2016 15:07:01 -0500 Subject: [PATCH] Don't update plugins twice --- scripts/helpers/plugin_functions.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/helpers/plugin_functions.sh b/scripts/helpers/plugin_functions.sh index b1dfb3d..25b0603 100644 --- a/scripts/helpers/plugin_functions.sh +++ b/scripts/helpers/plugin_functions.sh @@ -44,6 +44,9 @@ tpm_plugins_list_helper() { # read set -g @plugin "tmux-plugins/tmux-example-plugin" entries _tmux_conf_contents "full" | awk '/^[ \t]*set(-option)? +-g +@plugin/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $4 }' + # split to separate lines, sort, choose unique ones, put back to single line + sed 's/ /\n/g' | sort | uniq | tr "\n" " " + } # Allowed plugin name formats: