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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion for zsh #603

Closed
ukch opened this issue May 1, 2020 · 2 comments · Fixed by #639
Closed

Completion for zsh #603

ukch opened this issue May 1, 2020 · 2 comments · Fixed by #639
Labels
good first issue A good first issue to get started with. help wanted Need some extra hands to get this done. size/sm Small level of effort type/enhancement Issue that requests a new feature or improvement.

Comments

@ukch
Copy link

ukch commented May 1, 2020

Description

Currently, the only shell-completion that exists is for bash. Attempting to run the bash completion in zsh returns the following error:

/path/to/.pack/completion:type:786: bad option: -t

This is using pack 0.10.0, installed from the GitHub release.

Proposed solution

If possible, make a fully POSIX-compliant completion file, that works on sh, bash, zsh among others. If this is not possible, please make a zsh-specific completion file.

@ukch ukch added status/triage Issue or PR that requires contributor attention. type/enhancement Issue that requests a new feature or improvement. labels May 1, 2020
@dfreilich
Copy link
Member

@ukch Under the hoods, pack uses cobra to generate the bash shell completion (see here.). It seems that there is support for Zsh completion in cobra (spf13/cobra#646), but no fully POSIX-compliant completion yet (spf13/cobra#646 (comment)).

@zmackie zmackie added good first issue A good first issue to get started with. help wanted Need some extra hands to get this done. size/sm Small level of effort and removed status/triage Issue or PR that requires contributor attention. labels May 15, 2020
@zmackie
Copy link
Contributor

zmackie commented May 15, 2020

Breadcrumb: https://github.com/VilledeMontreal/cobra/blob/feat/zshCompletionV2/shell_completions.md

cobra is getting completion for bash, zsh, powershell, and fish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good first issue to get started with. help wanted Need some extra hands to get this done. size/sm Small level of effort type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants