Skip to content

Commit c27df7d

Browse files
committed
Set defualt value for options if some flags are not set
1 parent 2c335a4 commit c27df7d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

phpctags

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ EOF;
3434

3535
$file = realpath(array_pop($argv));
3636

37-
if(isset($options['fields'])) {
38-
$options['fields'] = str_split($options['fields']);
37+
if(!isset($options['excmd']))
38+
$options['excmd'] = 'pattern';
39+
if(!isset($options['format']))
40+
$options['format'] = 2;
41+
if(!isset($options['fields'])) {
42+
$options['fields'] = array('n', 'k','s', 'a');
3943
} else {
40-
$options['fields'] = array('k','s');
44+
$options['fields'] = str_split($options['fields']);
4145
}
4246

4347
$ctags = new PHPCtags($file, $options);

0 commit comments

Comments
 (0)