prosperon/acme/cdef

25 lines
471 B
Plaintext
Raw Normal View History

2022-06-28 18:51:21 -05:00
#!/usr/bin/perl
# Use with tags created with 'ctags -x'; give it a symbol
use strict;
use warnings;
my $pat = $ARGV[0] or die("Need a tag to find");
print "Found for the tag $pat: \n";
sub main
{
my $t = 'tags';
open(FH, $t) or die("File $t not found.");
while (my $line = <FH>) {
if ($line =~ /^$pat/) {
my @l = split(' ', $line);
#print "$l[3]:$l[2] \n";
exec 'echo $l[3]:$l[2] > /dev/null'
}
}
}
main();