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 @@ -215,7 +215,18 @@ if (isset($options['f']) && $options['f'] !== '-') {
215215} else {
216216 $ tagfile = fopen ('tags ' , isset ($ options ['a ' ]) ? 'a ' : 'w ' );
217217}
218- fwrite ($ tagfile , $ result );
218+
219+ $ mode = ($ options ['sort ' ] == 'yes ' ? 1 : ($ options ['sort ' ] == 'foldcase ' ? 2 : 0 ));
220+ $ tagline = <<<EOF
221+ !_TAG_FILE_FORMAT \t2 \t/extended format; --format=1 will not append ;" to lines/
222+ !_TAG_FILE_SORTED \t{$ mode }\t/0=unsorted, 1=sorted, 2=foldcase/
223+ !_TAG_PROGRAM_AUTHOR \ttechlivezheng \t/techlivezheng@gmail.com/
224+ !_TAG_PROGRAM_NAME \tphpctags \t//
225+ !_TAG_PROGRAM_URL \thttps://github.com/techlivezheng/phpctags \t/official site/
226+ !_TAG_PROGRAM_VERSION \t0.3 \t// \n
227+ EOF ;
228+
229+ fwrite ($ tagfile , $ tagline .$ result );
219230fclose ($ tagfile );
220231
221232function yes_or_no ($ arg ) {
You can’t perform that action at this time.
0 commit comments