mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 02:18:53 +02:00
refactor(completion, parser): move custom_completion info from Expression to Signature (#15613)
Restricts custom completion from universal to internal arguments only. Pros: 1. Less memory 2. More flexible for later customizations, e.g. #14923 Cons: 1. limited customization capabilities, but at least covers all currently existing features in nushell. # Description Mostly vibe coded by [Zed AI](https://zed.dev/ai) with a single prompt. LGTM, but I'm not so sure @ysthakur # User-Facing Changes Hopefully none. # Tests + Formatting +3 # After Submitting --------- Co-authored-by: Yash Thakur <45539777+ysthakur@users.noreply.github.com>
This commit is contained in:
@ -45,6 +45,7 @@ fn test_signature_chained() {
|
||||
shape: SyntaxShape::String,
|
||||
var_id: None,
|
||||
default_value: None,
|
||||
custom_completion: None,
|
||||
})
|
||||
);
|
||||
assert_eq!(
|
||||
@ -55,6 +56,7 @@ fn test_signature_chained() {
|
||||
shape: SyntaxShape::String,
|
||||
var_id: None,
|
||||
default_value: None,
|
||||
custom_completion: None,
|
||||
})
|
||||
);
|
||||
assert_eq!(
|
||||
@ -65,6 +67,7 @@ fn test_signature_chained() {
|
||||
shape: SyntaxShape::String,
|
||||
var_id: None,
|
||||
default_value: None,
|
||||
custom_completion: None,
|
||||
})
|
||||
);
|
||||
|
||||
@ -78,6 +81,7 @@ fn test_signature_chained() {
|
||||
desc: "required named description".to_string(),
|
||||
var_id: None,
|
||||
default_value: None,
|
||||
custom_completion: None,
|
||||
})
|
||||
);
|
||||
|
||||
@ -91,6 +95,7 @@ fn test_signature_chained() {
|
||||
desc: "required named description".to_string(),
|
||||
var_id: None,
|
||||
default_value: None,
|
||||
custom_completion: None,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user