clink icon indicating copy to clipboard operation
clink copied to clipboard

zsh like completion in cmd.exe

Open clouds56 opened this issue 8 years ago • 3 comments

when I input "some" and hit TAB if only one match (e.g. "some-folder"), complete this match. else if they have common prefix (e.g. "some-folder" and "some-other" have common prefix "some-") and longer than original text ("some"), complete to the common prefix ("some-") else show all options just like clink-completion-shim but in this case, when you hit TAB again, cycle in the list (with current selection highlight)

> ls
some-folder some-other

# Case 1
> some-f # hit <TAB>
=> some-folder

# Case 2
> some # hit <TAB>
=> some-

# Case 3
> some- # hit <TAB>
=> some- # hit <TAB> again
some-folder some-other
=> some-folder # hit <TAB> again
**some-folder** some-other
=> some-other
some-folder **some-other**

could this been implement?

clouds56 avatar Oct 03 '17 17:10 clouds56

I was also looking for this behaviour for a while. Directly adding completion without showing the candidate list is sometimes not ideal.

For folders with a large number of files that have a similar prefix, the current completion will take a long time to get what I want. I need to ls first then do commands with the filename...

xarthurx avatar Apr 29 '19 08:04 xarthurx

@clouds56 Found a solution here: https://unix.stackexchange.com/questions/24419/terminal-autocomplete-cycle-through-suggestions

Not exactly what ZSH has, but almost the same. Good enough for me.

xarthurx avatar Apr 29 '19 08:04 xarthurx

The fork at chrisant996/clink has zsh-like / PowerShell-like interactive completion. Bind the clink-select-complete command to tab to use it.

chrisant996 avatar Jul 27 '21 03:07 chrisant996