mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 15:06:03 +02:00
Rename SyntaxShape::Custom
to CompleterWrapper
(#10548)
# Description The description `Custom` doesn't really reflect meaning in the set of `SyntaxShape`. Makes it a bit more verbose but explicit # User-Facing Changes Only hypothetically breaking as plugins can not effectively use a requirement on `SyntaxShape::Custom`. # Tests + Formatting (-)
This commit is contained in:
committed by
GitHub
parent
cc4f8bbd82
commit
9e445fd4c5
@ -321,7 +321,7 @@ fn get_documentation(
|
||||
// document shape helps showing more useful information
|
||||
pub fn document_shape(shape: SyntaxShape) -> SyntaxShape {
|
||||
match shape {
|
||||
SyntaxShape::Custom(inner_shape, _) => *inner_shape,
|
||||
SyntaxShape::CompleterWrapper(inner_shape, _) => *inner_shape,
|
||||
_ => shape,
|
||||
}
|
||||
}
|
||||
|
@ -573,7 +573,7 @@ impl<'e, 's> ScopeData<'e, 's> {
|
||||
|
||||
fn extract_custom_completion_from_arg(engine_state: &EngineState, shape: &SyntaxShape) -> String {
|
||||
return match shape {
|
||||
SyntaxShape::Custom(_, custom_completion_decl_id) => {
|
||||
SyntaxShape::CompleterWrapper(_, custom_completion_decl_id) => {
|
||||
let custom_completion_command = engine_state.get_decl(*custom_completion_decl_id);
|
||||
let custom_completion_command_name: &str = custom_completion_command.name();
|
||||
custom_completion_command_name.to_string()
|
||||
|
Reference in New Issue
Block a user