diff --git a/crates/nu-command/src/strings/char_.rs b/crates/nu-command/src/strings/char_.rs index 40fc541218..92ab7f9da8 100644 --- a/crates/nu-command/src/strings/char_.rs +++ b/crates/nu-command/src/strings/char_.rs @@ -157,7 +157,10 @@ impl Command for Char { fn signature(&self) -> Signature { Signature::build("char") - .input_output_types(vec![(Type::Nothing, Type::String)]) + .input_output_types(vec![ + (Type::Nothing, Type::String), + (Type::Nothing, Type::Table(vec![])), + ]) .optional( "character", SyntaxShape::Any, @@ -167,6 +170,7 @@ impl Command for Char { .switch("list", "List all supported character names", Some('l')) .switch("unicode", "Unicode string i.e. 1f378", Some('u')) .switch("integer", "Create a codepoint from an integer", Some('i')) + .allow_variants_without_examples(true) .category(Category::Strings) }