We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5189e94 commit a715d04Copy full SHA for a715d04
crates/nu-cli/src/completions/cell_path_completions.rs
@@ -113,7 +113,9 @@ fn get_suggestions_by_value(
113
) -> Vec<SemanticSuggestion> {
114
let to_suggestion = |s: String, v: Option<&Value>| {
115
// Check if the string needs quoting (has spaces or punctuation)
116
- let value = if s.contains(|c: char| c.is_whitespace() || c.is_ascii_punctuation()) {
+ let value = if s.contains(|c: char| {
117
+ c.is_whitespace() || (c.is_ascii_punctuation() && !(['_', '-'].contains(&c)))
118
+ }) {
119
format!("{:?}", s)
120
} else {
121
s
0 commit comments