Set user option if exact match, even if prefix

The `:set` command wasn't allowing `prover` as a key, since
`prover-stats` also exists. Now it allows an exact match even if it's a
prefix of some other option. To set `prover-stats` or a similar option,
spell it out more completely.
This commit is contained in:
Aaron Tomb 2017-03-21 09:04:17 -07:00
parent d174ac38ba
commit aa900df04c

View File

@ -489,7 +489,7 @@ mkUserEnv opts = Map.fromList $ do
-- | Set a user option.
setUser :: String -> String -> REPL ()
setUser name val = case lookupTrie name userOptions of
setUser name val = case lookupTrieExact name userOptions of
[opt] -> setUserOpt opt
[] -> io (putStrLn ("Unknown env value `" ++ name ++ "`"))