1
0
forked from GitHub/gf-core

added syntax and examples fields to command help

This commit is contained in:
aarne
2008-06-14 10:02:40 +00:00
parent 93122ed338
commit dbfe4c94e4
3 changed files with 91 additions and 33 deletions

View File

@@ -134,8 +134,8 @@ wordCompletion cmdEnv line prefix p =
Left _ -> ret ' ' []
CmplOpt (Just (Command n _ _)) pref
-> case Map.lookup n (commands cmdEnv) of
Just inf -> do let flg_compls = ['-':flg | flg <- flags inf, isPrefixOf pref flg]
opt_compls = ['-':opt | opt <- options inf, isPrefixOf pref opt]
Just inf -> do let flg_compls = ['-':flg | (flg,_) <- flags inf, isPrefixOf pref flg]
opt_compls = ['-':opt | (opt,_) <- options inf, isPrefixOf pref opt]
ret (if null flg_compls then ' ' else '=')
(flg_compls++opt_compls)
Nothing -> ret ' ' []