fix a bogus error with -f and no command
This commit is contained in:
parent
3fa9fab9a4
commit
98509d4bbc
@ -316,8 +316,8 @@ toCliOpts rawopts = do
|
|||||||
|
|
||||||
-- workaround for http://code.google.com/p/ndmitchell/issues/detail?id=457
|
-- workaround for http://code.google.com/p/ndmitchell/issues/detail?id=457
|
||||||
-- just handles commonest cases
|
-- just handles commonest cases
|
||||||
moveFlagsAfterCommand ("-f":f:cmd:rest) = cmd:"-f":f:rest
|
moveFlagsAfterCommand (fflagandval@('-':'f':_:_):cmd:rest) = cmd:fflagandval:rest
|
||||||
moveFlagsAfterCommand (first:cmd:rest) | "-f" `isPrefixOf` first = cmd:first:rest
|
moveFlagsAfterCommand ("-f":fval:cmd:rest) = cmd:"-f":fval:rest
|
||||||
moveFlagsAfterCommand as = as
|
moveFlagsAfterCommand as = as
|
||||||
|
|
||||||
-- | Convert possibly encoded option values to regular unicode strings.
|
-- | Convert possibly encoded option values to regular unicode strings.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user