New patches:
[Make promptCharFancy easier to extend.
Eric Kow <kowey@darcs.net>**20100504153154
Ignore-this: 709ac11d2884f9618cd9c755b9109c97
] hunk ./src/Darcs/SelectChanges.hs 72
Introduction of an auxiliray PromptConfig type, ok.
[Rename Darcs.Utils.promptCharFancy to promptChar.
Eric Kow <kowey@darcs.net>**20100504163216
Ignore-this: f4c68187e3e4ad5f5a5cb850ce12f269
] replace ./src/Darcs/SelectChanges.hs [A-Za-z_0-9] promptCharFancy
promptChar
replace ./src/Darcs/Utils.hs [A-Za-z_0-9] promptCharFancy promptChar
[Resolve issue1713: shorter interactive prompts.
Eric Kow <kowey@darcs.net>**20100505095342
Ignore-this: bfa234bf337140af441f59958ff72c7b
For example, instead of asking
Shall I record this change? (1/8) [ynWesfvplxdaqjk], or ? for help:
we ask
Shall I record this change? (1/8) [ynW...], or ? for more options:
The goal is to make the most important options visible while making it
evident that there are more advanced features to be used.
NB: one principle we try to respect is that the default choice should
appear in the window of basic choices.
]
[snip uses of promptChar...]
data PromptConfig = PromptConfig { pPrompt :: String
, pCharacters :: [Char]
+ , pWindow :: Maybe Int -- ^ only
show the first N characters in prompt
, pDefault :: Maybe Char
, pHelp :: [Char]
}
hunk ./src/Darcs/Utils.hs 232
I'd rather have had the following, which seems more robust:
PromptConfig { pPrompt :: String
, pBasicCharacters :: [Char]
+ , pAdvancedCharacters :: [Char] -- ^
Options only displayed on hitting ?
, pDefault :: Maybe Char
, pHelp :: [Char]
}
The rest is ok.
[Camel case Darcs.SelectChanges.
Eric Kow <kowey@darcs.net>**20100505095640
Ignore-this: 38a462ddafc1ce5e4a898bc9180a1852
]
camel casing, ok
It's up to you whether you amend or I apply.
|