diff --git a/crates/nu-command/src/core_commands/help_commands.rs b/crates/nu-command/src/core_commands/help_commands.rs index 0a34de61e..adf6a27e5 100644 --- a/crates/nu-command/src/core_commands/help_commands.rs +++ b/crates/nu-command/src/core_commands/help_commands.rs @@ -163,13 +163,9 @@ fn build_help_commands(engine_state: &EngineState, span: Span) -> Vec { }); cols.push("search_terms".into()); - vals.push(if search_terms.is_empty() { - Value::nothing(span) - } else { - Value::String { - val: search_terms.join(", "), - span, - } + vals.push(Value::String { + val: search_terms.join(", "), + span, }); found_cmds_vec.push(Value::Record { cols, vals, span }); diff --git a/crates/nu-engine/src/scope.rs b/crates/nu-engine/src/scope.rs index 467cb0998..edcd85110 100644 --- a/crates/nu-engine/src/scope.rs +++ b/crates/nu-engine/src/scope.rs @@ -234,13 +234,9 @@ impl<'e, 's> ScopeData<'e, 's> { let search_terms = decl.search_terms(); cols.push("search_terms".to_string()); - vals.push(if search_terms.is_empty() { - Value::nothing(span) - } else { - Value::String { - val: search_terms.join(", "), - span, - } + vals.push(Value::String { + val: search_terms.join(", "), + span, }); commands.push(Value::Record { cols, vals, span })