* patch for completion of ctags tags
@ 2013-03-14 19:16 Pavol Juhas
0 siblings, 0 replies; only message in thread
From: Pavol Juhas @ 2013-03-14 19:16 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 556 bytes --]
Hello,
I have recently found that completion of tag labels after "vim -t <Tab>"
works on Linuxes, but not on the MacOSX.
I have tracked this down to the _complete_tag function, which assumes
ctags file format when the tags file is named "tags" and emacs-tags format
when "TAGS". However, filesystem is not case-sensitive on MacOSX and
as a result, the tags file would be always detected in the emacs format.
The attached patch against the zsh-users github repository should fix
that by checking the first line in the tags file.
Hope this helps,
Pavol
[-- Attachment #2: 0001-On-case-insesitive-file-systems-look-at-the-first-li.patch --]
[-- Type: application/octet-stream, Size: 973 bytes --]
From 8c5032d28cb6067eee3211acf736d5348731c03e Mon Sep 17 00:00:00 2001
From: Pavol Juhas <pavol.juhas@gmail.com>
Date: Thu, 14 Mar 2013 14:04:52 -0400
Subject: [PATCH] On case insesitive file-systems look at the first line of the
tags file to decide if it is in ctags or etags format.
---
Completion/Base/Widget/_complete_tag | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Completion/Base/Widget/_complete_tag b/Completion/Base/Widget/_complete_tag
index 5a26c38..5b50f1d 100644
--- a/Completion/Base/Widget/_complete_tag
+++ b/Completion/Base/Widget/_complete_tag
@@ -32,6 +32,11 @@ while [[ ! -f $c_path$c_Tagsfile &&
c_path=../$c_path
done
+if [[ -f $c_path$c_Tagsfile && $c_path$c_Tagsfile -ef $c_path$c_tagsfile &&
+ "$(head -1 $c_path$c_tagsfile)" == '!_TAG_'* ]]; then
+ c_Tagsfile=
+fi
+
if [[ -f $c_path$c_Tagsfile ]]; then
# prefer the more comprehensive TAGS, which unfortunately is a
# little harder to parse.
--
1.8.1.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-14 19:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-14 19:16 patch for completion of ctags tags Pavol Juhas
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).