zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
3.09k stars 128 forks source link

Dynamic completion #406

Closed psprint closed 1 year ago

psprint commented 1 year ago

Description

Complete plugin ids at any position in the command line via Alt-Shift-A and ices via Alt-Shift-C. Both keys are unbound by default, and can be customized via two zstyles, e.g.:

zstyle ":zinit:action-complete:plugin-id" key '^f'
zstyle ":zinit:action-complete:ice" key '^a'

Motivation and Context

Current normal completion doesn't work with for-syntax – it'll not complete plugin id for, e.g.:

zi for zdh<TAB>

While the new, action-complete, will work at any position.

Related Issue(s)

Closes #331.

Usage examples

zi for june/<Alt-A> →zi  for junegunn/fzf

See: https://asciinema.org/a/3bzyTIEXN4iNiDLyRAARcDypt

Types of changes

Checklist:

psprint commented 1 year ago

I've also added a description to README.

psprint commented 1 year ago

Could the PR be merged?

psprint commented 1 year ago

Could the PR be merged?

psprint commented 1 year ago

I've cleanup the PR (squash and 'feat:" prefix), could it be merged?

psprint commented 1 year ago

Is there any obstacle to merge the commit? It's an isolated change – active at prompt, live – it cannot break anything…

psprint commented 1 year ago

@vladdoster @pschmitt @jankatins ping

psprint commented 1 year ago

@vladdoster Could the PR be merged as an Xmas gift? A mention of this could be added to README.md.

psprint commented 1 year ago

@vladdoster @pschmitt @jankatins ping for merging this PR, presentation:

https://asciinema.org/a/547978