Hi list.

today I found interesting program /usr/bin/helpztags
from output of "dpkg -L vim-common" on Ubuntu.

so I run it to some of my plugins.
but helpztags only supports for .txt help file.
so I wrote the patch to fix it.

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
--- helpztags.bak	2010-10-15 07:03:05.000000000 +0900
+++ helpztags	2010-10-15 07:11:35.000000000 +0900
@@ -51,9 +51,9 @@
 foreach $dir (@ARGV) {
   chdir $dir || die "Error: $dir: no such directory\n";
   print "Processing ".$dir."\n";
-  open(TAGSFILE,">tags") || die "Error: Cannot open $dir/tags for writing.\n";
-  foreach $file (<*.{gz,txt}>) {
-    next unless $file =~ m/^[\w.-]+\.txt(?:.gz)?$/;
+  foreach $file (<*.{gz,txt,??x}>) {
+    next unless $file =~ m/^[\w.-]+\.(txt|[a-zA-Z]{2}x)(?:.gz)?$/;
+    $suffix=$1 eq 'txt' ? '' : "-".substr($1, 0, 2);
     do { open(GZ, "zcat $file|") if ($file =~ /\.gz$/) } or open(GZ,$file);
     while (<GZ>) {
         # From vim61/src/ex_cmds.c, lines 5034-5036
@@ -66,8 +66,9 @@
       }
     }
     close(GZ);
+    open(TAGSFILE,">tags$suffix") || die "Error: Cannot open $dir/tags for writing.\n";
+    map { print TAGSFILE "$_\t$tags{$_}\t/*"; s'\\'\\\\'g; s'/'\/'g; print TAGSFILE "$_*\n" } sort keys %tags;
+    close TAGSFILE;
   }
-  map { print TAGSFILE "$_\t$tags{$_}\t/*"; s'\\'\\\\'g; s'/'\/'g; print TAGSFILE "$_*\n" } sort keys %tags;
-  close TAGSFILE;
   chdir $startdir;
 }

Raspunde prin e-mail lui