nosarthur / gita

Manage many git repos with sanity 从容管理多个git库
MIT License
1.66k stars 73 forks source link

Make new zsh completion #132 #266

Closed Turiok closed 10 months ago

Turiok commented 10 months ago

Hello everyone,

I have succeeded with the old zsh completion. Adding in my .zshrc

autoload -U +X bashcompinit && bashcompinit
source /path/to/your/gita_completion_script

But the completion is not Zsh style and seems very limited.

I propose a new zsh completion. It's my second completion zsh script. So be nice and give me pointers if I'm wrong.

I find the completion nicer and dynamic depending your configuration. By exemple, it display your repositories or your groups.

To me, it miss 2 things :

Other problem. If the community doesn't know zsh completion. It is probably complex to maintain. Maybe, I'll propose this completion to other repository like https://github.com/zsh-users/zsh-completions if @nosarthur doesn't want this PR.

nosarthur commented 10 months ago

Thanks for the contribution. Maybe add a folder and place both completion script there so people can choose?

Turiok commented 10 months ago

Do you want I move the bash completion version in bash folder?

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (a5ba6fe) 86.25% compared to head (d109b6d) 86.38%.

:exclamation: Current head d109b6d differs from pull request most recent head 6791680. Consider uploading reports for the commit 6791680 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #266 +/- ## ========================================== + Coverage 86.25% 86.38% +0.12% ========================================== Files 5 5 Lines 793 793 ========================================== + Hits 684 685 +1 + Misses 109 108 -1 ``` [see 1 file with indirect coverage changes](https://app.codecov.io/gh/nosarthur/gita/pull/266/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Dong+Zhou)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nosarthur commented 10 months ago

sure, thanks

One minor suggestion: the folder structure can be simplified to auto-completion/zsh/... and auto-completion/bash/...

Turiok commented 10 months ago

OK to change the folder. I made that in case you have other contribution for other people.