You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cabal should include build targets in --list-options #1382
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.
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.
Activity
dcoutts commentedon 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 commentedon Jul 17, 2013
We should also extend
--list-optionsto support subcommands. Right now,cabal sandbox --list-optionsgives me:hvr commentedon May 18, 2017
See also #4070