;run,repl: dont print unrecognized text, error out
This commit is contained in:
parent
ef6b6ecc1b
commit
4a08f975f6
@ -124,7 +124,7 @@ runCommand defaultJrnl findBuiltinCommand cmdline = do
|
|||||||
"echo":args -> putStrLn $ unwords $ args
|
"echo":args -> putStrLn $ unwords $ args
|
||||||
cmdname:args ->
|
cmdname:args ->
|
||||||
case findBuiltinCommand cmdname of
|
case findBuiltinCommand cmdname of
|
||||||
Nothing -> putStrLn $ unwords (cmdname:args)
|
Nothing -> error' $ "Unrecognized command: " ++ unwords (cmdname:args)
|
||||||
Just (cmdmode,cmdaction) -> do
|
Just (cmdmode,cmdaction) -> do
|
||||||
-- Even though expandArgsAt is done by the Cli.hs, it stops at the first '--', so we need
|
-- Even though expandArgsAt is done by the Cli.hs, it stops at the first '--', so we need
|
||||||
-- to do it here as well to make sure that each command can use @ARGFILEs
|
-- to do it here as well to make sure that each command can use @ARGFILEs
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user