aboutsummaryrefslogtreecommitdiff
path: root/scripts/vim-patch-helper.awk
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vim-patch-helper.awk')
-rw-r--r--scripts/vim-patch-helper.awk18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/vim-patch-helper.awk b/scripts/vim-patch-helper.awk
new file mode 100644
index 0000000000..5a089fb0ec
--- /dev/null
+++ b/scripts/vim-patch-helper.awk
@@ -0,0 +1,18 @@
+#/usr/bin/env awk -f
+BEGIN {
+ FS="|";
+}
+{
+ if ($2 == "") {
+ print($1)
+ } else {
+ n=split($2,ary,", ");
+ for (i=1;i<=n;i++) {
+ if (match(ary[i], /tag: /)) {
+ gsub(/[()]/, "", ary[i]);
+ sub(/ *tag: /, "", ary[i]);
+ print(ary[i]);
+ }
+ }
+ }
+}