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:
Stefan Holderbach
2023-09-29 19:22:58 +02:00
committed by GitHub
parent cc4f8bbd82
commit 9e445fd4c5
4 changed files with 8 additions and 8 deletions

View File

@ -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,
}
}

View File

@ -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()