Skip to content

Commit 4b7839e

Browse files
committed
Add support for --recurse option
1 parent f205a0c commit 4b7839e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

phpctags

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $options = getopt('af:R',array(
1818
'excmd::',
1919
'fields::',
2020
'format::',
21+
'recurse::',
2122
'version',
2223
));
2324

@@ -56,6 +57,14 @@ if(isset($options['append'])) {
5657
}
5758
}
5859

60+
if(isset($options['recurse'])) {
61+
if ($options['recurse'] === FALSE || yes_or_no($options['recurse']) == 'yes') {
62+
$options['R'] = FALSE;
63+
} else if (yes_or_no($options['recurse']) != 'no') {
64+
die('phpctags: Invalid value for "recurse" option');
65+
}
66+
}
67+
5968
$ctags = new PHPCtags();
6069
$result = '';
6170
if (isset($options['R'])) {

0 commit comments

Comments
 (0)