diff options
| -rw-r--r-- | CHANGES.md | 1 | ||||
| -rw-r--r-- | src/compile/cli.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -55,6 +55,7 @@ `foo.baz.method()` when `foo` is a `&Foo` and `baz.method()` takes a `&Baz`. - Optional paths no longer fail to compile when you check them for `none`. - Text replacement no longer infinitely loops when given an empty text to replace. + - Short CLI flag aliases now no longer use the first letter of the argument. ## v0.3 diff --git a/src/compile/cli.c b/src/compile/cli.c index e3d2329f..e5756521 100644 --- a/src/compile/cli.c +++ b/src/compile/cli.c @@ -144,7 +144,7 @@ Text_t compile_cli_arg_call(env_t *env, Text_t fn_name, type_t *fn_type, const c code = Texts(code, "{", quoted_text(Text$replace(Text$from_str(arg->name), Text("_"), Text("-"))), ", &", Texts("_$", Text$from_str(arg->name)), ", ", compile_type_info(arg->type), arg->default_val ? Text("") : Text(", .required=true"), - arg->alias ? Texts(", .short_flag=", quoted_text(Text$from_str(arg->name)), + arg->alias ? Texts(", .short_flag=", quoted_text(Text$from_str(arg->alias)), "[0]") // TODO: escape char properly : Text(""), |
