mirror of
https://github.com/nushell/nushell.git
synced 2025-06-21 02:18:44 +02:00
fix: test
This commit is contained in:
parent
5189e9486c
commit
a715d04055
@ -113,7 +113,9 @@ fn get_suggestions_by_value(
|
|||||||
) -> Vec<SemanticSuggestion> {
|
) -> Vec<SemanticSuggestion> {
|
||||||
let to_suggestion = |s: String, v: Option<&Value>| {
|
let to_suggestion = |s: String, v: Option<&Value>| {
|
||||||
// Check if the string needs quoting (has spaces or punctuation)
|
// Check if the string needs quoting (has spaces or punctuation)
|
||||||
let value = if s.contains(|c: char| c.is_whitespace() || c.is_ascii_punctuation()) {
|
let value = if s.contains(|c: char| {
|
||||||
|
c.is_whitespace() || (c.is_ascii_punctuation() && !(['_', '-'].contains(&c)))
|
||||||
|
}) {
|
||||||
format!("{:?}", s)
|
format!("{:?}", s)
|
||||||
} else {
|
} else {
|
||||||
s
|
s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user