# HG changeset patch # User Ludovic Chabant # Date 1408645952 25200 # Node ID c11616828595b0cb4e9973a1241ae7dae6402702 # Parent b557282af215c4ebd975862329bc632bc1c1fa6c Add an option to specify a `ctags` options file to be used. Fixed some arguments being forgotten in the Windows script. diff -r b557282af215 -r c11616828595 plat/unix/update_tags.sh --- a/plat/unix/update_tags.sh Tue Jul 29 16:11:24 2014 -0700 +++ b/plat/unix/update_tags.sh Thu Aug 21 11:32:32 2014 -0700 @@ -18,6 +18,7 @@ echo " -t [file=tags]: The path to the ctags file to update" echo " -s [file=]: The path to the source file that needs updating" echo " -x [pattern=]: A pattern of files to exclude" + echo " -o [options=]: An options file to read additional options from" echo "" } @@ -43,6 +44,9 @@ p) PAUSE_BEFORE_EXIT=1 ;; + o) + CTAGS_ARGS="$CTAGS_ARGS --options=$OPTARG" + ;; esac done diff -r b557282af215 -r c11616828595 plat/win32/update_tags.cmd --- a/plat/win32/update_tags.cmd Tue Jul 29 16:11:24 2014 -0700 +++ b/plat/win32/update_tags.cmd Thu Aug 21 11:32:32 2014 -0700 @@ -43,6 +43,11 @@ shift goto :LoopParseArgs ) +if [%1]==[-o] ( + set CTAGS_ARGS=%CTAGS_ARGS% --options=%2 + shift + goto :LoopParseArgs +) echo Invalid Argument: %1 goto :Usage @@ -57,7 +62,6 @@ rem GENERATE TAGS rem ========================================== -set CTAGS_ARGS= if [%LOG_FILE%]==[] set LOG_FILE=CON echo Locking tags file... > %LOG_FILE% @@ -68,7 +72,7 @@ echo Removing references to: %UPDATED_SOURCE% >> %LOG_FILE% echo type "%TAGS_FILE%" ^| findstr /V /C:"%UPDATED_SOURCE%" ^> "%TAGS_FILE%.temp" >> %LOG_FILE% findstr /V /C:"%UPDATED_SOURCE%" "%TAGS_FILE%" > "%TAGS_FILE%.temp" - set CTAGS_ARGS=--append %UPDATED_SOURCE% + set CTAGS_ARGS=%CTAGS_ARGS% --append %UPDATED_SOURCE% ) ) @@ -103,5 +107,6 @@ echo -t [file=tags]: The path to the ctags file to update echo -s [file=]: The path to the source file that needs updating echo -l [log=]: The log file to output to +echo -o [options=]: An options file to read additional options from echo. diff -r b557282af215 -r c11616828595 plugin/autotags.vim --- a/plugin/autotags.vim Tue Jul 29 16:11:24 2014 -0700 +++ b/plugin/autotags.vim Thu Aug 21 11:32:32 2014 -0700 @@ -49,6 +49,10 @@ endif let g:autotags_project_root += ['.git', '.hg', '.bzr', '_darcs'] +if !exists('g:autotags_options_file') + let g:autotags_options_file = '' +endif + if !exists('g:autotags_exclude') let g:autotags_exclude = [] endif @@ -306,6 +310,9 @@ if g:autotags_pause_after_update let l:cmd .= ' -p' endif + if len(g:autotags_options_file) + let l:cmd .= ' -o "' . g:autotags_options_file . '"' + endif if g:autotags_trace if has('win32') let l:cmd .= ' -l "' . fnamemodify(l:tags_file, ':t') . '.log"'