better multiword parameter handling
This way, individual words as entered on the command line are available to commands.
This commit is contained in:
parent
8fa17eaba0
commit
ceff04ff3e
7 changed files with 30 additions and 22 deletions
|
@ -18,12 +18,12 @@ command = [repoCommand "describe" (paramPair paramRemote paramDesc) seek
|
|||
"change description of a repository"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
seek = [withString start]
|
||||
seek = [withWords start]
|
||||
|
||||
start :: CommandStartString
|
||||
start params = notBareRepo $ do
|
||||
start :: CommandStartWords
|
||||
start ws = notBareRepo $ do
|
||||
let (name, description) =
|
||||
case (words params) of
|
||||
case ws of
|
||||
(n:d) -> (n,unwords d)
|
||||
_ -> error "Specify a repository and a description."
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue