From 484bad775f76cee449a9124649be42459b4f21df Mon Sep 17 00:00:00 2001 From: Fabio 'c0m3tx' Vitale Date: Tue, 7 Mar 2017 17:27:51 +0100 Subject: [PATCH] Fix for relative path of js script --- plugins/mongo/mongo.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/mongo/mongo.plugin.zsh b/plugins/mongo/mongo.plugin.zsh index 7e6c58f0..4e77f10e 100644 --- a/plugins/mongo/mongo.plugin.zsh +++ b/plugins/mongo/mongo.plugin.zsh @@ -1,6 +1,7 @@ +script_root=${0:a:h} + _mongodbs() { - mypath=$(dirname $0) - compadd $(mongo --quiet $mypath/load_databases.js) + compadd $(mongo --quiet $script_root/load_databases.js) } compdef _mongodbs mongo