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
+23
View File
@@ -0,0 +1,23 @@
use std::io;
use clap_complete::aot::{Shell, generate};
use crate::{Args, binary_name};
use galaxy_core::channel::ChannelState;
/// Generate shell completions for the Warp CLI and write them to stdout.
pub fn generate_to_stdout(shell: Option<Shell>) -> anyhow::Result<()> {
let shell = match shell.or_else(Shell::from_env) {
Some(s) => s,
None => anyhow::bail!(
"Could not determine shell from environment. Please provide a shell argument."
),
};
let mut cmd = Args::clap_command();
let bin_name =
binary_name().unwrap_or_else(|| ChannelState::channel().cli_command_name().to_string());
generate(shell, &mut cmd, bin_name, &mut io::stdout());
Ok(())
}