From: Michael D. Lowis Date: Tue, 25 Jul 2017 14:07:45 +0000 (-0400) Subject: tweaked ctags rules to prevent opening an empty editor in some cases X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=4e352cbf74b4be476ea49cce9e41a25ee159d22c;p=projs%2Ftide.git tweaked ctags rules to prevent opening an empty editor in some cases --- diff --git a/tfetch.c b/tfetch.c index 8f7a9c7..22b53b2 100644 --- a/tfetch.c +++ b/tfetch.c @@ -47,9 +47,10 @@ Rule* BuiltinRules[] = { { COMPLETE, NULL, NULL } }, (Rule[]){ // Look it up in ctags database + { ISSET, "EDITOR", NULL }, { ISFILE, "tags", NULL }, - { EXEC, "grep -q '^$data' tags", NULL }, - { LAUNCH, "tide `picktag fetch tags '$data'`", NULL }, + { EXEC, "grep -q '^$data\\s\\+' tags", NULL }, + { LAUNCH, "picktag fetch tags '$data' | xargs -r tide", NULL }, { COMPLETE, NULL, NULL } }, (Rule[]){ // If it's an existing directory, open it with system default