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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support shell completions for ZSH (and/or different shells) #129

Closed
ghost opened this issue Jan 11, 2022 · 4 comments
Closed

Support shell completions for ZSH (and/or different shells) #129

ghost opened this issue Jan 11, 2022 · 4 comments
Labels
feature New feature or request

Comments

@ghost
Copy link

ghost commented Jan 11, 2022

Hi there,
first of all thanks for this nice project. In comparison to the other ZSH managers out there, I found it very pleasing to work with sheldon. 馃槉

It would be a nice to have shell completions for the different shells, at least for ZSH. :)

@rossmacarthur
Copy link
Owner

@nachtjasmin Hi, could you elaborate on your request, I'm not exactly sure what this feature would look like?

@ghost
Copy link
Author

ghost commented Jan 11, 2022

When I press , the shell could automatically suggest certain actions and provide an explanation. Example:

$ git <TAB>
zsh: do you wish to see all 212 possibilities (212 lines)?

and

$ git merge <TAB>
merge          -- join two or more development histories together
merge-base     -- find as good a common ancestor as possible for a merge
merge-file     -- run a three-way file merge
merge-index    -- run merge for files needing merging
merge-into     -- merge one branch into another
merge-one-file -- standard helper-program to use with git merge-index
merge-repo     -- merge two repo histories
merge-tree     -- show three-way merge without touching index
mergetool      -- run merge conflict resolution tools to resolve merge conflicts

are outputs that would be created. chezmoi, for example, a project written in Go, autogenerates these, I don't know if this is possible with your Rust implementation. It would make the execution of certain commands faster to type as I could use the autosuggestions by the shell without invoking sheldon -h first.

@rossmacarthur rossmacarthur added the feature New feature or request label Jan 11, 2022
@rossmacarthur
Copy link
Owner

rossmacarthur commented Jan 11, 2022

Ohhh, I thought you were talking about sheldon managing completions. Yes this makes sense as a feature 馃槃. Looks like we should be able to use clap_complete for this.

@rossmacarthur
Copy link
Owner

Implemented in 08002dc. The completions will be bundled in future release archives. They will also be generatable using sheldon completions --shell bash/zsh. Additionally I will update the Sheldon Homebrew formula to automatically install them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant