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

Cabal should include build targets in --list-options #1382

Open
hvr opened this issue Jul 3, 2013 · 3 comments
Open

Cabal should include build targets in --list-options #1382

hvr opened this issue Jul 3, 2013 · 3 comments
Labels
cabal-install: other old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: enhancement
Milestone

Comments

@hvr
Copy link
Member

hvr commented Jul 3, 2013

This would simplify implementing (bash)Programmable Completion for commands taking a build target, such as cabal build, cabal test or cabal run, as the current state would require to reinvent cabal's strategy for locating the .cabal file and parsing the cabal file for potential targets (while not being able to detect currently disabled targets)

So basically this just requires to include the targets where applicable in the --list-options output.

@dcoutts
Copy link
Contributor

dcoutts commented Jul 17, 2013

Yes would be nice.

It would need some work on the framework we have for describing commands/sub-commands, to extend it with support for completing argument, not just the existing stuff for completing flags. That system currently has a separation between the description of the command UI and the action associated with running the command. We'd want to keep that separation (it's used to allow cabal-install to re-use and extend the command line UI of Setup.hs) and so I think we'd want to treat command option completion in a similar way to command execution, ie as a separate thing that we associate with a command UI to produce something that can actually be executed.

@23Skidoo
Copy link
Member

We should also extend --list-options to support subcommands. Right now, cabal sandbox --list-options gives me:

-h
--help
-v
--verbose
--snapshot
--sandbox

@hvr
Copy link
Member Author

hvr commented May 18, 2017

See also #4070

@andreabedini andreabedini added the old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cabal-install: other old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: enhancement
Projects
None yet
Development

No branches or pull requests

5 participants