Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though

This commit is contained in:
Ryan Ward
2026-05-07 11:29:34 -05:00
parent f4e2475c60
commit a41cbd8cc7
2433 changed files with 14208 additions and 9409 deletions
@@ -0,0 +1,18 @@
use crate::{completer::TopLevelCommandCaseSensitivity, signatures::CommandRegistry};
/// Returns the name of the argument that should be given at `idx` for the given command.
pub(super) fn argument_name_at_index_for_command(
command: &str,
idx: usize,
command_registry: &CommandRegistry,
command_case_sensitivity: TopLevelCommandCaseSensitivity,
) -> Option<String> {
command_registry
.signature_from_line(command, command_case_sensitivity)
.and_then(|found_signature| {
let arguments = found_signature.signature.arguments();
arguments
.get(idx)
.map(|arg| arg.name().unwrap_or_default().to_string())
})
}