Skip to content

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

Open

Description

@hvr

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.

Activity

  1. dcoutts commented on Jul 17, 2013

    @dcoutts
    Contributor

    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.

  2. 23Skidoo commented on Jul 17, 2013

    @23Skidoo
    Member

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

    -h
    --help
    -v
    --verbose
    --snapshot
    --sandbox
    
  3. added this to the milestone on Apr 23, 2015
  4. hvr commented on May 18, 2017

    @hvr
    MemberAuthor

    See also #4070

  5. added
    old-milestone: ⊥
    on Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cabal-install: otherold-milestone: ⊥type: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions