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

feature: ghcup list should be able to filter by tool #1235

Open
ulysses4ever opened this issue Feb 28, 2025 · 4 comments · May be fixed by #1238
Open

feature: ghcup list should be able to filter by tool #1235

ulysses4ever opened this issue Feb 28, 2025 · 4 comments · May be fixed by #1238

Comments

@ulysses4ever
Copy link
Contributor

❯ ghcup list ghc                                                                                                              
Invalid argument `ghc'

I'd like the above to produce a list of GHC versions available.

@ulysses4ever
Copy link
Contributor Author

Oh, after trying ghc list --help, I found out that there's -t that filters by tool. Why isn't it the normal argument but a flag? I think ghcup list ghc should work...

@hasufell
Copy link
Member

hasufell commented Mar 1, 2025

I think the idea was to be able to specify -t multiple times. A flag is more proper for that.

@ulysses4ever
Copy link
Contributor Author

Mm… I’d guess one tool is a by-far more common use case but I don’t have the data. Would ghcup list ghc stack be bad? Not sure why… cabal build expects 0 or more targets and that seems to work fine.

@hasufell
Copy link
Member

hasufell commented Mar 1, 2025

It's inconsistent with the rest of the cli interface.

ghcup install ghc stack doesn't work and can't work properly.

Arguments, in ghcup interface, open a new context (called subcommand in optparse-applicative).

hasufell added a commit that referenced this issue Mar 4, 2025
@hasufell hasufell linked a pull request Mar 4, 2025 that will close this issue
hasufell added a commit that referenced this issue Mar 4, 2025
hasufell added a commit that referenced this issue Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants