microsoft / inshellisense

IDE style command line auto complete
MIT License
8.23k stars 180 forks source link

feat: add complete command #78

Closed rsteube closed 6 months ago

rsteube commented 7 months ago

Exposes completions using another subcommand.

esh ❯ inshellisense complete -- git l
{"suggestions":[{"name":"ls-remote","description":"List references in a remote repository","icon":"📦","allNames":["ls-remote"],"priority":50},{"name":"log","description":"Show commit logs","icon":"📦","allNames":["log"],"priority":50}],"charactersToDrop":1}

related https://github.com/microsoft/inshellisense/issues/65

rsteube commented 7 months ago

@microsoft-github-policy-service agree

cpendery commented 6 months ago

Looks great @rsteube, I just merged it with the most recent changes and tweaked the input to be is complete "git l" instead of is complete -- git l to reduce the code complexity.

cereschen commented 6 months ago

看起来很棒@rsteube,我只是将其与最新的更改合并,并将输入调整为is complete "git l"而不是is complete -- git l降低代码复杂性。

Although the result was output quickly, it will take some time to finish. Please optimize it as it will affect the speed of obtaining the result