Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: ctags tag completion



This adds completion for ctags tags which will also be useful for vi(m)
completion when I get around to tidying it up.

Regards,
Doug


Index: Completion/Unix/Command/_less
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_less,v
retrieving revision 1.1
diff -u -r1.1 _less
--- Completion/Unix/Command/_less	1 Mar 2004 12:22:52 -0000	1.1
+++ Completion/Unix/Command/_less	8 Jun 2005 07:30:56 -0000
@@ -103,7 +103,7 @@
       if (( $+LESSGLOBALTAGS )); then
         _global_tags
       else
-        _message -e ctags tag
+        _ctags
       fi
     ;;
   esac
Index: Completion/Unix/Type/_ctags
===================================================================
RCS file: Completion/Unix/Type/_ctags
diff -N Completion/Unix/Type/_ctags
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Type/_ctags	8 Jun 2005 07:30:58 -0000
@@ -0,0 +1,7 @@
+#autoload
+
+local expl tags
+
+[[ -r tags ]] && tags=( ${${${(f)"$(< tags)"}:#!*}%%[[:blank:]]*} )
+
+_wanted ctags expl 'tag' compadd -M 'm:{a-zA-Z}={A-Za-z}' -a "$@" - tags



Messages sorted by: Reverse Date, Date, Thread, Author