From 4e352cbf74b4be476ea49cce9e41a25ee159d22c Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Tue, 25 Jul 2017 10:07:45 -0400 Subject: [PATCH] tweaked ctags rules to prevent opening an empty editor in some cases --- tfetch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.49.0