Ticket #503 (closed enhancement: fixed)

Opened 4 years ago

Last modified 17 months ago

"cabal haddock" should accept --hyperlink-sources (not just --hyperlink-source)

Reported by: SamB Owned by:
Priority: normal Milestone:
Component: Cabal library Version: 1.6.0.1
Severity: normal Keywords:
Cc: Difficulty: very easy (<1 hour)
GHC Version: Platform:

Description

I don't know how many times I've tried to pass it in the plural... it's getting annoying.

What would the best way to get this to work be?

Attachments

Change History

Changed 4 years ago by duncan

  • difficulty changed from unknown to very easy (<1 hour)

Pretty easy. See for example the way we allow different spellings of "optimisation" vs "optimization":

From Distribution/Simple/Setup.hs:

  noArg (Flag NoOptimisation) []
        ("disable-optimization": case showOrParseArgs of
              -- Allow British English spelling:
              ShowArgs -> []; ParseArgs -> ["disable-optimisation"])
        "Build without optimization"

I'd like to make it even easier in future. Just declare flags with a single current name and a list of allowed deprecated or alias names. The latter would not show up in the --help output.

Changed 4 years ago by duncan

  • type changed from defect to enhancement

Changed 3 years ago by noteed

Changed 3 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed

Thanks! Patch applied.

Tue Jun  8 15:54:44 BST 2010  Vo Minh Thu <noteed@gmail.com>
  * --help shows first long option and added --hyperlink-sources
  The --help option output now prints only the first (if any)
  long option. Because of this, --{enable,disable}-optimisation
  (british spelling) is simply added to the list of options
  without testing showOrParseArgs. --hyperlink-sources is now
  also accepted for the haddock command.

Changed 17 months ago by elga

Note: See TracTickets for help on using tickets.