Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tab autocompetion for git is inconsistent (doesn't work with git add) #885

@c33s

Description

@c33s

i testes cmd.exe with clink, there git autocompletion works as expected, tab completes the path after an add:

C:\test>git add
CHANGES             clink.lua           clink_x64.exe
LICENSE             clink_dll_x64.dll   clink_x86.exe
clink.bat           clink_dll_x86.dll   profile\
clink.html          clink_inputrc_base
C:\test>git add
CHANGES             clink.lua           clink_x64.exe
LICENSE             clink_dll_x64.dll   clink_x86.exe
clink.bat           clink_dll_x86.dll   profile\
clink.html          clink_inputrc_base
C:\test>git add clink
clink.bat           clink_dll_x64.dll   clink_x64.exe
clink.html          clink_dll_x86.dll   clink_x86.exe
clink.lua           clink_inputrc_base
C:\test>git add clink.
clink.bat   clink.html  clink.lua
C:\test>git add clink.bat

doing the same with cmder does not work. pressing tab does nothing with git add

C:\test
λ git add

git apply works as expected and completes the path
C:\test
λ git apply
CHANGES clink.html clink_dll_x86.dll clink_x86.exe
LICENSE clink.lua clink_inputrc_base profile
clink.bat clink_dll_x64.dll clink_x64.exe
C:\test
λ git apply

changing the C:\Program Files\Cmder\vendor\clink-completions\git.lua from

--- snip ---
local git_parser = parser(
    {
        {alias},
        "add" .. parser({files},
            "-n", "--dry-run",
            "-v", "--verbose",
--- snip ---

to

--- snip ---
local git_parser = parser(
    {
        {alias},
        "add" .. parser(
            "-n", "--dry-run",
            "-v", "--verbose",
--- snip ---

make it work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions