Skip to content

Command::infer_long_args

since 0.1.0

Allow partial matches of long arguments or their aliases.

name = "myprog"
infer-long-args = true
[args]
test = { long = "test", action = "set-true" }
temp = { long = "temp", action = "set-true" }
Terminal window
myprog --te
Terminal window
error: unexpected argument '--te' found
tip: a similar argument exists: '--temp'
Usage: myprog --temp
For more information, try '--help'.
name = "myprog"
infer-long-args = true
[args]
test = { long = "test", action = "set-true" }
Terminal window
myprog --te
Terminal window
claptrap_test='true'