From 4c5148bcfcff09ced8cf54ccdfb139f1a5729c61 Mon Sep 17 00:00:00 2001 From: Michael Stergianis Date: Tue, 15 Nov 2022 11:05:44 -0500 Subject: [PATCH] Adds logic to find the correct vcs path Signed-off-by: Michael Stergianis --- conf.d/plugin-vcs.fish | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conf.d/plugin-vcs.fish b/conf.d/plugin-vcs.fish index 34891a8..1c1cffa 100644 --- a/conf.d/plugin-vcs.fish +++ b/conf.d/plugin-vcs.fish @@ -1,4 +1,10 @@ -set -l vcs_path (dirname (dirname $conf_path)) +# conf_path is passed in as an array from `require --path` +for conf in $conf_path + if echo $conf | grep -q 'vcs' + # setting function scoped as local scoped means it is local to the if block + set -f vcs_path (dirname (dirname $conf)) + end +end for vcs in git hg svn source $vcs_path/functions/$vcs/vcs.$vcs.present.fish