Skip to content

Commit 942b358

Browse files
sandermarechalweynhamz
authored andcommitted
Add support for -a option
1 parent 68f4bb3 commit 942b358

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

phpctags

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if (is_dir($vendor = __DIR__ . '/vendor')) {
1212
);
1313
}
1414

15-
$options = getopt('f:',array(
15+
$options = getopt('af:',array(
1616
'debug',
1717
'excmd::',
1818
'fields::',
@@ -51,7 +51,7 @@ $ctags = new PHPCtags();
5151
$result = $ctags->export($file, $options);
5252

5353
if (isset($options['f']) && $options['f'] !== '-') {
54-
$tagfile = fopen($options['f'], 'w');
54+
$tagfile = fopen($options['f'], isset($options['a']) ? 'a' : 'w');
5555
} else {
5656
$tagfile = fopen('php://stdout', 'w');
5757
}

0 commit comments

Comments
 (0)