Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix several gtags related issues: mission update_gtags.cmd & lack of execution permission #336

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion autoload/gutentags.vim
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ endfunction
" into a list of unquoted arguments on Unix/Mac.
if has('win32') || has('win64')
function! gutentags#make_args(cmd) abort
return join(a:cmd, ' ')
if &shell == 'pwsh' || &shell == 'powershell'
return '& ' . join(a:cmd, ' ')
else
return join(a:cmd, ' ')
endif
endfunction
else
function! gutentags#make_args(cmd) abort
Expand Down
Empty file modified plat/unix/update_gtags.sh
100644 → 100755
Empty file.
Empty file modified plat/unix/update_pyscopedb.sh
100644 → 100755
Empty file.
56 changes: 56 additions & 0 deletions plat/win32/update_gtags.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@echo off

setlocal EnableExtensions EnableDelayedExpansion

rem ==========================================
rem PARSE ARGUMENTS
rem ==========================================
set "GTAGS_EXE=gtags"
set "GTAGS_ARGS="
set "FILE_LIST_CMD="

if [%1]==[] goto :Usage

:ParseArgs
if [%1]==[] goto :DoneParseArgs
if [%1]==[-e] (
set GTAGS_EXE=%~2
shift /1
shift /1
goto :ParseArgs
)
if [%1]==[-L] (
set FILE_LIST_CMD=%~2
shift /1
shift /1
goto :ParseArgs
)
set "GTAGS_ARGS=%GTAGS_ARGS% %1"
shift /1
goto :ParseArgs

:DoneParseArgs
rem ==========================================
rem GENERATE GTAGS
rem ==========================================
set "GTAGS_CMD=%GTAGS_EXE% %GTAGS_ARGS%"
if /i not "%FILE_LIST_CMD%"=="" (
set "GTAGS_CMD=%FILE_LIST_CMD% | %GTAGS_EXE% -f- %GTAGS_ARGS%"
)
echo Running gtags:
echo "%GTAGS_CMD%"
call %GTAGS_CMD%
echo Done.
goto :EOF
rem ==========================================
rem USAGE
rem ==========================================

:Usage
echo Usage:
echo %~n0 ^<options^>
echo.
echo -e [exe=gtags]: The gtags executable to run.
echo -L [cmd=]: The file list command to run
echo.