From a44cab3fcf12600dd768d57839da70a62a3c4051 Mon Sep 17 00:00:00 2001 From: JackDrogon Date: Mon, 1 Feb 2016 14:41:03 +0800 Subject: [PATCH] Fix plugin line start with tab problem --- scripts/helpers/plugin_functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/helpers/plugin_functions.sh b/scripts/helpers/plugin_functions.sh index 6ee7a5d..b1dfb3d 100644 --- a/scripts/helpers/plugin_functions.sh +++ b/scripts/helpers/plugin_functions.sh @@ -28,7 +28,7 @@ _tmux_conf_contents() { # return files sourced from tmux config files _sourced_files() { _tmux_conf_contents | - awk '/^ *source(-file)? +/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $2 }' + awk '/^[ \t]*source(-file)? +/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $2 }' } # PUBLIC FUNCTIONS BELOW @@ -43,7 +43,7 @@ tpm_plugins_list_helper() { # read set -g @plugin "tmux-plugins/tmux-example-plugin" entries _tmux_conf_contents "full" | - awk '/^ *set(-option)? +-g +@plugin/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $4 }' + awk '/^[ \t]*set(-option)? +-g +@plugin/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $4 }' } # Allowed plugin name formats: