File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,18 @@ if (isset($options['f']) && $options['f'] !== '-') {
217217} else {
218218 $ tagfile = fopen ('tags ' , isset ($ options ['a ' ]) ? 'a ' : 'w ' );
219219}
220- fwrite ($ tagfile , $ result );
220+
221+ $ mode = ($ options ['sort ' ] == 'yes ' ? 1 : ($ options ['sort ' ] == 'foldcase ' ? 2 : 0 ));
222+ $ tagline = <<<EOF
223+ !_TAG_FILE_FORMAT \t2 \t/extended format; --format=1 will not append ;" to lines/
224+ !_TAG_FILE_SORTED \t{$ mode }\t/0=unsorted, 1=sorted, 2=foldcase/
225+ !_TAG_PROGRAM_AUTHOR \ttechlivezheng \t/techlivezheng@gmail.com/
226+ !_TAG_PROGRAM_NAME \tphpctags \t//
227+ !_TAG_PROGRAM_URL \thttps://github.com/techlivezheng/phpctags \t/official site/
228+ !_TAG_PROGRAM_VERSION \t0.3 \t// \n
229+ EOF ;
230+
231+ fwrite ($ tagfile , $ tagline .$ result );
221232fclose ($ tagfile );
222233
223234function yes_or_no ($ arg ) {
You can’t perform that action at this time.
0 commit comments