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

Autocomplete for files doesn't work #826

Closed
armak opened this issue Feb 4, 2016 · 27 comments
Closed

Autocomplete for files doesn't work #826

armak opened this issue Feb 4, 2016 · 27 comments
Labels
👆 clink Upstream issue in clink.

Comments

@armak
Copy link

armak commented Feb 4, 2016

Autocompletion by pressing tab doesn't work in the latest Cmder I downloaded from the official website. This happens with the default settings (including a complete Reset...) and I couldn't find any setting that could fix this. Autocomplete works fine on directories and commands though.

@okoetter
Copy link

I have the same problem. E.g. when I do a git add filename I get no autocompletion for filename. Is there a workaround until this gets fixed?

cmder 1.2.9
ConEmu 150913 [32]
Clink v0.4.7

@MartiUK
Copy link
Member

MartiUK commented Feb 26, 2016

Does this build resolve your issues?

https://ci.appveyor.com/project/MartiUK/cmder/build/1.0.186-master/artifacts

@armak
Copy link
Author

armak commented Feb 26, 2016

It doesn't, same behavior exhibited.

@lstolcman
Copy link

Same here with git. Video: http://sendvid.com/efqrkp9g
I tried to install newest clink and conemu but this doesn't resolve this bug so problem is with cmder

@jankatins
Copy link
Contributor

A workaround could be git add -- file.

I don't see this problem, git add file complets here.

@armak
Copy link
Author

armak commented Mar 2, 2016

I did some experimentation earlier. The issue is "solved" if you remove clink entirely from vendor/clink/, but this causes various issues with text output:

cmder1

Replacing clink with other versions either does nothing or causes equivalent issues. However, replacing the clink component from my current, much older version of Cmder with the clink version supplied with the most recent Cmder doesn't affect the behavior and file completion still works normally in the old Cmder.

I'm also using Windows 7, if that makes a difference.

@rakete
Copy link

rakete commented May 23, 2016

I just had the same problem with 1.2.9 and clink 0.4.7, as okoetter described it, I could not auto-complete filenames and directories after something like 'git add'. This seemed to only affect git, other commands worked fine.

Then I tested with 1.3.0-pre and with that version auto-completion works correctly.

@okoetter
Copy link

I downloaded 1.3.0-pre with ConEmu 160328 and it also works for me now.

@armak
Copy link
Author

armak commented Jun 6, 2016

Still doesn't work for me on 1.3.0-pre. Completion currently only works for directories, .exe files and for some reason .js files. Possibly some others too but those are the only ones I noticed to work.

Also weird behavior with javascript files, if I write or complete the filename of an entire .js file and press TAB, it lists the entire contents of the current directory.

@mortona42
Copy link

I had the problem (no tab completion for files after [git add ]). Upgrading to 1.3.0 fixed it for me, I think I had 1.3.0-pre before then.

@CIPop
Copy link

CIPop commented Feb 24, 2017

Latest 1.3.2 still has this issue: no autocompletion for files within the current directory.

@okitu
Copy link

okitu commented Mar 3, 2017

This here solved it for me:
#508 (comment)

@armak
Copy link
Author

armak commented Mar 13, 2017

Yes, the setting mentioned okitu seems to finally resolve this for good!

@drspangle
Copy link

I'm using Cmder latest with ConEmu 161206 x64 stable, and I can confirm that okitu's fix doesn't work. With no text on the prompt, the tab autocomplete does now correctly list the folder contents of the current working directory, but when anything is typed in matching only occurs with executables found in the PATH, not the current working directory, and not with anything other than executables.

To clarify what I did, re: #508, I modified the existing line setting exec_match_style = 2 to exec_match_style = -1

@ihavenonickname
Copy link

ihavenonickname commented Oct 31, 2017

#508 didn't do the trick for me, same as @drspangle

I have a scripts folder in PATH with some powershell scripts. I execute them a lot from everywhere in my system. It would be much easier with tab completion.

@OlegGorenko
Copy link

I deleted the file <%CMDER-ROOT%>\config\settings and restarted cmder.

Now I have auto-completion.

@Dimon4eg
Copy link

Dimon4eg commented Nov 7, 2018

For me also #508 is not solution.

I tried exec_match_style = -1 but it introduces another problem - autocomplete doesn't display executable from PATH:

  1. exec_match_style = 2
    executable from PATH - OK
    scripts from directory - FAIL

  2. exec_match_style = -1
    executable from PATH - FAIL
    scripts from directory - OK

How to make it work for both cases?

@Stanzilla Stanzilla added the 👆 clink Upstream issue in clink. label Nov 8, 2018
@daxgames
Copy link
Member

daxgames commented Dec 2, 2018

Seems to work in the current version. Closing.

@daxgames daxgames closed this as completed Dec 2, 2018
@Dimon4eg
Copy link

Dimon4eg commented Dec 3, 2018

Still doesn't work as expected.
cmder version 1.3.10.811
OS: Windows 7 x64

How to reproduce:
precondition:
let we have test folder with one file inside: build.py
and test.exe in some folder which is specified in PATH

case 1. exec_match_style = 2

  • type 'bu' then - result: bunzip2.exe - Not OK
  • type 'te' then - result: test.exe - OK

case 2. exec_match_style = -1

  • type 'bu' then - result: build.py - OK
  • type 'te' then - result: - Not OK

@daxgames
Copy link
Member

daxgames commented Dec 3, 2018

What you are expecting is wrong. Tab completion works as it would on a Linux system, the current folder is not in the path and must be specified using .\ or ./. Try:

.\bu[tab]

@Dimon4eg
Copy link

Dimon4eg commented Dec 3, 2018

.\ or ./ doesn't work

@daxgames
Copy link
Member

daxgames commented Dec 3, 2018

It does for me. What version you running?

cmder_tab_complete

@Dimon4eg
Copy link

Dimon4eg commented Dec 3, 2018

I specified version above.
Can you try steps as I described?

@daxgames
Copy link
Member

daxgames commented Dec 3, 2018

I did and you are correct build.py does not auto complete but this is not a Cmder issue. You are trying to auto complete the first word of a line therefore a command to be run so the file must be executable in cmd.exe.

On Windows in cmd.exe sessions executeable file extensions are configured by the PATHEXT environment variable. Mine is currently set to:

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

If I add .py to it autocomplete works.

@Dimon4eg
Copy link

Dimon4eg commented Dec 3, 2018

Cool! Now it works as expected.
Thank you @daxgames !

@AlanTrudor
Copy link

Hey I am facing the same issue with the latest release of v1.3.18.1106, and so far none of the above solutions have worked for me. Did someone manage to resolve it?

@chrisant996
Copy link
Contributor

chrisant996 commented Aug 15, 2021

Hey I am facing the same issue with the latest release of v1.3.18.1106, and so far none of the above solutions have worked for me. Did someone manage to resolve it?

Instead of adding a reply to 3 different closed issues (#826, #508, #218), please open a new issue, and please include the output from clink set to share what your settings are.

Also, please be specific about what problem(s) you're encountering. The 3 closed issues describe different behaviors, so it's unclear what you are trying, or what is happening, and that makes it very difficult to try to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👆 clink Upstream issue in clink.
Projects
None yet
Development

No branches or pull requests