rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood4566a719cb7ef8e6648e5790930c6c44bdc098f8
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Updated",
"patch": {
"id": "f15b2b93586dcc88c7bc4c1b38ef312b85bdeed1",
"author": {
"id": "did:key:z6Mku263TDxoptFHqPNaz8aFeuc3kyJhcQKJPPVB9wkBgR76",
"alias": "flepied"
},
"title": "cli: add bash completion for the rad command",
"state": {
"status": "open",
"conflicts": []
},
"before": "11fc98c9c9c4c681d265e765df05c2f9d503ddc9",
"after": "4566a719cb7ef8e6648e5790930c6c44bdc098f8",
"commits": [
"4566a719cb7ef8e6648e5790930c6c44bdc098f8"
],
"target": "11fc98c9c9c4c681d265e765df05c2f9d503ddc9",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "f15b2b93586dcc88c7bc4c1b38ef312b85bdeed1",
"author": {
"id": "did:key:z6Mku263TDxoptFHqPNaz8aFeuc3kyJhcQKJPPVB9wkBgR76",
"alias": "flepied"
},
"description": "add `rad completion bash` to generate a bash completion file.",
"base": "55cdd880bfee08124d5b6a38cc05036402c7ab6e",
"oid": "6175295c2c54a56c8b74f3c3416a51b76390c02e",
"timestamp": 1756511333
},
{
"id": "0b1b117a0c2930ec60d8984dc385d9c8db7a093e",
"author": {
"id": "did:key:z6Mku263TDxoptFHqPNaz8aFeuc3kyJhcQKJPPVB9wkBgR76",
"alias": "flepied"
},
"description": "fix missing complete statement at the end of the generated output",
"base": "55cdd880bfee08124d5b6a38cc05036402c7ab6e",
"oid": "e2411271f9615baf3f2a14724f44039ecc1833ca",
"timestamp": 1756547375
},
{
"id": "4a3a3d1aa0c721921dc7e5f9e3ac60e6e9cd0b94",
"author": {
"id": "did:key:z6Mku263TDxoptFHqPNaz8aFeuc3kyJhcQKJPPVB9wkBgR76",
"alias": "flepied"
},
"description": "automated sub-command and sub-sub-command discovery",
"base": "55cdd880bfee08124d5b6a38cc05036402c7ab6e",
"oid": "c7c5297479ee046db507590961f41d36655a276d",
"timestamp": 1756573277
},
{
"id": "a1353ffc0d8b15b291d1b616ddf8151d10588899",
"author": {
"id": "did:key:z6Mku263TDxoptFHqPNaz8aFeuc3kyJhcQKJPPVB9wkBgR76",
"alias": "flepied"
},
"description": "rebased on master",
"base": "f00d1d67432882bef11fc940601f071efe55c88d",
"oid": "38804d501eae87217e143857c4236916bfabf82a",
"timestamp": 1757007990
},
{
"id": "76a1376bfd1f9352768efe14e864d9499eb64939",
"author": {
"id": "did:key:z6Mku263TDxoptFHqPNaz8aFeuc3kyJhcQKJPPVB9wkBgR76",
"alias": "flepied"
},
"description": "rebased on master",
"base": "11fc98c9c9c4c681d265e765df05c2f9d503ddc9",
"oid": "4566a719cb7ef8e6648e5790930c6c44bdc098f8",
"timestamp": 1757424105
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "846672d4-5bfa-4872-b00f-4206c44dd1db"
},
"info_url": "https://cci.rad.levitte.org//846672d4-5bfa-4872-b00f-4206c44dd1db.html"
}
Started at: 2025-09-09 15:21:48.672944+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/846672d4-5bfa-4872-b00f-4206c44dd1db/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 116 issues · 16 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout f15b2b93586dcc88c7bc4c1b38ef312b85bdeed1
✓ Switched to branch patch/f15b2b9 at revision 76a1376
✓ Branch patch/f15b2b9 setup to track rad/patches/f15b2b93586dcc88c7bc4c1b38ef312b85bdeed1
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 4566a719cb7ef8e6648e5790930c6c44bdc098f8
HEAD is now at 4566a719 cli: add bash completion for the rad command
Exit code: 0
$ git show 4566a719cb7ef8e6648e5790930c6c44bdc098f8
commit 4566a719cb7ef8e6648e5790930c6c44bdc098f8
Author: Frederic Lepied <flepied@gmail.com>
Date: Fri Aug 29 12:48:40 2025 +0200
cli: add bash completion for the rad command
diff --git a/crates/radicle-cli/src/commands.rs b/crates/radicle-cli/src/commands.rs
index e4df12c1..783a4ce7 100644
--- a/crates/radicle-cli/src/commands.rs
+++ b/crates/radicle-cli/src/commands.rs
@@ -10,6 +10,8 @@ pub mod rad_clean;
pub mod rad_clone;
#[path = "commands/cob.rs"]
pub mod rad_cob;
+#[path = "commands/completion.rs"]
+pub mod rad_completion;
#[path = "commands/config.rs"]
pub mod rad_config;
#[path = "commands/debug.rs"]
diff --git a/crates/radicle-cli/src/commands/completion.rs b/crates/radicle-cli/src/commands/completion.rs
new file mode 100644
index 00000000..14a66554
--- /dev/null
+++ b/crates/radicle-cli/src/commands/completion.rs
@@ -0,0 +1,71 @@
+use std::ffi::OsString;
+
+use crate::terminal as term;
+use crate::terminal::args::{Args, Error, Help};
+
+pub const HELP: Help = Help {
+ name: "completion",
+ description: "Generate shell completion scripts",
+ version: env!("RADICLE_VERSION"),
+ usage: "Usage: rad completion <shell> [--help]",
+};
+
+#[derive(Default)]
+pub struct Options {
+ pub shell: String,
+}
+
+impl Args for Options {
+ fn from_args(args: Vec<OsString>) -> anyhow::Result<(Self, Vec<OsString>)> {
+ let mut parser = lexopt::Parser::from_args(args);
+ let mut shell = String::new();
+
+ while let Some(arg) = parser.next()? {
+ match arg {
+ lexopt::Arg::Value(val) => {
+ if shell.is_empty() {
+ shell = val.to_string_lossy().to_string();
+ } else {
+ anyhow::bail!("Multiple shell arguments provided");
+ }
+ }
+ lexopt::Arg::Long("help") | lexopt::Arg::Short('h') => {
+ return Err(Error::HelpManual {
+ name: "rad-completion",
+ }
+ .into());
+ }
+ _ => anyhow::bail!(arg.unexpected()),
+ }
+ }
+
+ if shell.is_empty() {
+ shell = "bash".to_string();
+ }
+
+ Ok((Options { shell }, vec![]))
+ }
+}
+
+pub fn run(options: Options, _ctx: impl term::Context) -> anyhow::Result<()> {
+ match options.shell.to_lowercase().as_str() {
+ "bash" => {
+ let completion_script =
+ crate::completion::init_command_registry().generate_bash_completion();
+ println!("{}", completion_script);
+ }
+ "zsh" => {
+ println!("zsh completion not yet implemented");
+ }
+ "fish" => {
+ println!("fish completion not yet implemented");
+ }
+ _ => {
+ anyhow::bail!(
+ "Unsupported shell '{}'. Supported shells: bash, zsh, fish",
+ options.shell
+ );
+ }
+ }
+ Ok(())
+}
diff --git a/crates/radicle-cli/src/commands/help.rs b/crates/radicle-cli/src/commands/help.rs
index a1117f48..66209931 100644
--- a/crates/radicle-cli/src/commands/help.rs
+++ b/crates/radicle-cli/src/commands/help.rs
@@ -17,6 +17,7 @@ const COMMANDS: &[Help] = &[
rad_block::HELP,
rad_checkout::HELP,
rad_clone::HELP,
+ rad_completion::HELP,
rad_config::HELP,
rad_fork::HELP,
rad_help::HELP,
diff --git a/crates/radicle-cli/src/completion.rs b/crates/radicle-cli/src/completion.rs
new file mode 100644
index 00000000..f46feb4a
--- /dev/null
+++ b/crates/radicle-cli/src/completion.rs
@@ -0,0 +1,490 @@
+use std::collections::HashMap;
+
+// Import all command HELP constants for auto-generation
+use crate::commands::{
+ rad_auth, rad_block, rad_checkout, rad_clean, rad_clone, rad_cob, rad_completion, rad_config,
+ rad_debug, rad_diff, rad_follow, rad_fork, rad_help, rad_id, rad_inbox, rad_init, rad_inspect,
+ rad_issue, rad_ls, rad_node, rad_patch, rad_path, rad_publish, rad_remote, rad_seed, rad_self,
+ rad_stats, rad_sync, rad_unblock, rad_unfollow, rad_unseed, rad_watch,
+};
+
+/// Command metadata structure
+#[derive(Debug, Clone)]
+pub struct CommandMetadata {
+ pub name: String,
+ pub description: String,
+ pub options: Vec<OptionInfo>,
+ pub subcommands: Vec<SubcommandInfo>,
+ pub dynamic_completion: Option<DynamicCompletionType>,
+}
+
+/// Option information
+#[derive(Debug, Clone)]
+pub struct OptionInfo {
+ pub long: &'static str,
+ pub short: Option<char>,
+ pub description: &'static str,
+ pub takes_value: bool,
+}
+
+/// Subcommand metadata structure
+#[derive(Debug, Clone)]
+pub struct SubcommandInfo {
+ pub name: String,
+ pub description: String,
+ pub options: Vec<OptionInfo>,
+ pub subcommands: Vec<SubcommandInfo>,
+ pub dynamic_completion: Option<DynamicCompletionType>,
+}
+
+/// Type of dynamic completion for a command
+#[derive(Debug, Clone)]
+pub enum DynamicCompletionType {
+ PatchIds,
+ IssueIds,
+ BranchNames,
+ RemoteNames,
+ NodeIds,
+}
+
+/// Command registry that holds all completion metadata
+#[derive(Debug)]
+pub struct CommandRegistry {
+ commands: HashMap<&'static str, CommandMetadata>,
+}
+
+impl CommandRegistry {
+ /// Initialize the command registry with auto-generated metadata
+ pub fn init() -> Self {
+ let mut commands = HashMap::new();
+
+ // Auto-generate command metadata from the actual command HELP constants
+ // This ensures completion stays in sync with command implementations
+ let command_helps = [
+ ("auth", rad_auth::HELP),
+ ("block", rad_block::HELP),
+ ("checkout", rad_checkout::HELP),
+ ("clone", rad_clone::HELP),
+ ("cob", rad_cob::HELP),
+ ("completion", rad_completion::HELP),
+ ("config", rad_config::HELP),
+ ("debug", rad_debug::HELP),
+ ("diff", rad_diff::HELP),
+ ("follow", rad_follow::HELP),
+ ("fork", rad_fork::HELP),
+ ("help", rad_help::HELP),
+ ("id", rad_id::HELP),
+ ("inbox", rad_inbox::HELP),
+ ("init", rad_init::HELP),
+ ("inspect", rad_inspect::HELP),
+ ("issue", rad_issue::HELP),
+ ("ls", rad_ls::HELP),
+ ("node", rad_node::HELP),
+ ("patch", rad_patch::HELP),
+ ("path", rad_path::HELP),
+ ("publish", rad_publish::HELP),
+ ("clean", rad_clean::HELP),
+ ("self", rad_self::HELP),
+ ("seed", rad_seed::HELP),
+ ("sync", rad_sync::HELP),
+ ("unblock", rad_unblock::HELP),
+ ("unfollow", rad_unfollow::HELP),
+ ("unseed", rad_unseed::HELP),
+ ("remote", rad_remote::HELP),
+ ("stats", rad_stats::HELP),
+ ("watch", rad_watch::HELP),
+ ];
+
+ for (name, help) in command_helps {
+ commands.insert(
+ name,
+ CommandMetadata {
+ name: name.to_string(),
+ description: help.description.to_string(),
+ options: Self::extract_options_from_help(help.usage),
+ subcommands: Self::extract_subcommands_from_help(help.usage),
+ dynamic_completion: Self::get_dynamic_completion_type(name),
+ },
+ );
+ }
+
+ Self { commands }
+ }
+
+ /// Extract options from help usage text
+ fn extract_options_from_help(usage: &str) -> Vec<OptionInfo> {
+ let mut options = vec![
+ // Common options that most commands support
+ OptionInfo {
+ long: "help",
+ short: Some('h'),
+ description: "Print help",
+ takes_value: false,
+ },
+ ];
+
+ // Parse usage text to find additional options
+ // This is a simple parser - could be enhanced
+ if usage.contains("--json") {
+ options.push(OptionInfo {
+ long: "json",
+ short: None,
+ description: "Output as JSON",
+ takes_value: false,
+ });
+ }
+
+ if usage.contains("--verbose") || usage.contains("-v") {
+ options.push(OptionInfo {
+ long: "verbose",
+ short: Some('v'),
+ description: "Verbose output",
+ takes_value: false,
+ });
+ }
+
+ options
+ }
+
+ /// Extract sub-subcommands from help usage text for a specific subcommand
+ fn extract_sub_subcommands_from_help(usage: &str, subcommand: &str) -> Vec<SubcommandInfo> {
+ let mut sub_subcommands = vec![];
+
+ // Look for patterns like "rad <command> <subcommand> <sub-subcommand> [<option>...]"
+ let lines: Vec<&str> = usage.lines().collect();
+
+ for line in lines {
+ let line = line.trim();
+
+ // Look for lines that contain the specific subcommand pattern
+ // We need to be more flexible here since we don't know the exact command name
+ let parts: Vec<&str> = line.split_whitespace().collect();
+
+ // We need at least 4 parts: "rad", "<command>", "<subcommand>", "<sub-subcommand>"
+ if parts.len() >= 4 && parts[0] == "rad" {
+ // Check if this line contains our subcommand
+ if parts.len() > 2 && parts[2] == subcommand {
+ // Look for the sub-subcommand (4th part)
+ if parts.len() > 3 {
+ let sub_subcommand_name = parts[3];
+
+ // Skip if it's an option, placeholder, or already known
+ if !sub_subcommand_name.starts_with('-')
+ && !sub_subcommand_name.starts_with('<')
+ && !sub_subcommand_name.starts_with('[')
+ && !sub_subcommands
+ .iter()
+ .any(|s: &SubcommandInfo| s.name == sub_subcommand_name)
+ {
+ sub_subcommands.push(SubcommandInfo {
+ name: sub_subcommand_name.to_string(),
+ description: "Sub-subcommand".to_string(),
+ options: vec![],
+ subcommands: vec![], // Could be enhanced for even deeper nesting
+ dynamic_completion: None,
+ });
+ }
+ }
+ }
+ }
+ }
+
+ sub_subcommands
+ }
+
+ /// Extract subcommands from help usage text
+ fn extract_subcommands_from_help(usage: &str) -> Vec<SubcommandInfo> {
+ let mut subcommands = vec![];
+
+ // Parse the usage text to find subcommands at any level
+ // Look for patterns like "rad <command> <subcommand> [<option>...]"
+ // and "rad <command> <subcommand> <sub-subcommand> [<option>...]"
+ let lines: Vec<&str> = usage.lines().collect();
+
+ for line in lines {
+ let line = line.trim();
+
+ // Skip lines that don't contain the command pattern
+ if !line.contains("rad ") {
+ continue;
+ }
+
+ // Look for subcommand patterns in lines like:
+ // "rad patch list [<option>...]"
+ // "rad node db <command> [<option>..]"
+ // "rad issue edit <issue-id> [--title <title>] [<option>...]"
+ let parts: Vec<&str> = line.split_whitespace().collect();
+
+ // We need at least 3 parts: "rad", "<command>", "<subcommand>"
+ if parts.len() >= 3 {
+ let subcommand = parts[2];
+
+ // Skip if it's an option (starts with - or --) or placeholder (starts with < or [)
+ if !subcommand.starts_with('-')
+ && !subcommand.starts_with('<')
+ && !subcommand.starts_with('[')
+ {
+ // Check if we already have this subcommand
+ if !subcommands
+ .iter()
+ .any(|s: &SubcommandInfo| s.name == subcommand)
+ {
+ // Try to extract description from the line
+ let description = Self::extract_description_from_line(line);
+
+ subcommands.push(SubcommandInfo {
+ name: subcommand.to_string(),
+ description: description.to_string(),
+ options: vec![],
+ subcommands: Self::extract_sub_subcommands_from_help(usage, subcommand),
+ dynamic_completion: None,
+ });
+ }
+ }
+ }
+ }
+
+ subcommands
+ }
+
+ /// Extract description from a help line
+ fn extract_description_from_line(line: &str) -> &'static str {
+ // Try to find a description after the command
+ // Look for patterns like "rad patch list [<option>...] # List patches"
+ if let Some(comment_start) = line.find('#') {
+ let comment = &line[comment_start + 1..].trim();
+ if !comment.is_empty() {
+ // For now, return a generic description since we can't store dynamic strings
+ // In the future, we could enhance this to parse actual descriptions
+ return "Subcommand";
+ }
+ }
+
+ // Default description
+ "Subcommand"
+ }
+
+ /// Get dynamic completion type based on command name
+ fn get_dynamic_completion_type(command: &str) -> Option<DynamicCompletionType> {
+ match command {
+ "patch" => Some(DynamicCompletionType::PatchIds),
+ "issue" => Some(DynamicCompletionType::IssueIds),
+ "checkout" => Some(DynamicCompletionType::BranchNames),
+ "remote" => Some(DynamicCompletionType::RemoteNames),
+ "node" => Some(DynamicCompletionType::NodeIds),
+ _ => None,
+ }
+ }
+
+ /// Generate bash completion script
+ pub fn generate_bash_completion(&self) -> String {
+ let mut script = String::new();
+
+ // Generate the main completion function
+ script.push_str(&self.generate_main_completion_function());
+
+ // Generate subcommand completion functions
+ for (name, metadata) in &self.commands {
+ script.push_str(&self.generate_subcommand_completion_function(name, metadata));
+ }
+
+ // Add the completion entry that tells bash to use _rad for the rad command
+ script.push_str("\n# Register the completion function for the 'rad' command\n");
+ script.push_str("complete -F _rad rad\n");
+
+ script
+ }
+
+ /// Generate the main completion function
+ fn generate_main_completion_function(&self) -> String {
+ let mut script = String::new();
+
+ script.push_str("# bash completion for rad\n");
+ script.push_str("# Auto-generated from command implementations\n\n");
+
+ // Generate the main _rad function
+ script.push_str("_rad() {\n");
+ script.push_str(" local cur prev words cword\n");
+ script.push_str(" _init_completion -n =: 2>/dev/null || {\n");
+ script.push_str(" # Fallback for environments without _init_completion\n");
+ script.push_str(" cur=${COMP_WORDS[COMP_CWORD]}\n");
+ script.push_str(" prev=${COMP_WORDS[COMP_CWORD-1]}\n");
+ script.push_str(" words=(\"${COMP_WORDS[@]}\")\n");
+ script.push_str(" cword=$COMP_CWORD\n");
+ script.push_str(" }\n");
+ script.push('\n');
+
+ // Generate command list
+ let command_names: Vec<&str> = self.commands.keys().copied().collect();
+
+ // Split long command lists across multiple lines for better readability
+ if command_names.len() > 10 {
+ script.push_str(" local commands=\"");
+ for (i, name) in command_names.iter().enumerate() {
+ if i > 0 && i % 8 == 0 {
+ script.push_str(" \\\n ");
+ }
+ script.push_str(name);
+ if i < command_names.len() - 1 {
+ script.push_str(" ");
+ }
+ }
+ script.push_str("\"\n");
+ } else {
+ script.push_str(&format!(
+ " local commands=\"{}\"\n",
+ command_names.join(" ")
+ ));
+ }
+ script.push('\n');
+
+ // Generate the main completion logic
+ script.push_str(" case $cword in\n");
+ script.push_str(" 1)\n");
+ script.push_str(" COMPREPLY=($(compgen -W \"$commands\" -- \"$cur\"))\n");
+ script.push_str(" ;;\n");
+ script.push_str(" *)\n");
+ script.push_str(" case \"${words[1]}\" in\n");
+
+ // Generate cases for each command
+ for name in self.commands.keys() {
+ script.push_str(&format!(" {})\n", name));
+ script.push_str(&format!(" _rad_{}\n", name));
+ script.push_str(" ;;\n");
+ }
+
+ script.push_str(" *)\n");
+ script.push_str(" COMPREPLY=($(compgen -W \"--help --version --json\" -- \"$cur\"))\n");
+ script.push_str(" ;;\n");
+ script.push_str(" esac\n");
+ script.push_str(" ;;\n");
+ script.push_str(" esac\n");
+ script.push_str("}\n\n");
+
+ script
+ }
+
+ /// Generate subcommand completion function
+ fn generate_subcommand_completion_function(
+ &self,
+ name: &str,
+ metadata: &CommandMetadata,
+ ) -> String {
+ let mut script = String::new();
+
+ script.push_str(&format!("_rad_{}() {{\n", name));
+ script.push_str(" local cur prev words cword\n");
+ script.push_str(" _init_completion -n =: 2>/dev/null || {\n");
+ script.push_str(" # Fallback for environments without _init_completion\n");
+ script.push_str(" cur=${COMP_WORDS[COMP_CWORD]}\n");
+ script.push_str(" prev=${COMP_WORDS[COMP_CWORD-1]}\n");
+ script.push_str(" words=(\"${COMP_WORDS[@]}\")\n");
+ script.push_str(" cword=$COMP_CWORD\n");
+ script.push_str(" }\n");
+ script.push('\n');
+
+ // Generate subcommand list if any
+ if !metadata.subcommands.is_empty() {
+ let subcommand_names: Vec<&str> = metadata
+ .subcommands
+ .iter()
+ .map(|s| s.name.as_str())
+ .collect();
+ script.push_str(&format!(
+ " local subcommands=\"{}\"\n",
+ subcommand_names.join(" ")
+ ));
+ script.push('\n');
+ }
+
+ // Generate options list
+ let option_strings: Vec<String> = metadata
+ .options
+ .iter()
+ .map(|opt| {
+ if let Some(short) = opt.short {
+ format!("--{} -{}", opt.long, short)
+ } else {
+ format!("--{}", opt.long)
+ }
+ })
+ .collect();
+
+ if !option_strings.is_empty() {
+ script.push_str(&format!(
+ " local options=\"{}\"\n",
+ option_strings.join(" ")
+ ));
+ script.push('\n');
+ }
+
+ // Generate completion logic
+ script.push_str(" case $cword in\n");
+ script.push_str(" 2)\n");
+
+ if !metadata.subcommands.is_empty() {
+ script.push_str(" COMPREPLY=($(compgen -W \"$subcommands\" -- \"$cur\"))\n");
+ } else {
+ script.push_str(" COMPREPLY=($(compgen -W \"$options\" -- \"$cur\"))\n");
+ }
+
+ script.push_str(" ;;\n");
+ script.push_str(" *)\n");
+
+ // Handle dynamic completion
+ if let Some(dynamic_type) = &metadata.dynamic_completion {
+ match dynamic_type {
+ DynamicCompletionType::PatchIds => {
+ script.push_str(" # Dynamic completion for patch IDs\n");
+ script.push_str(" local patch_ids=$(rad patch list 2>/dev/null | awk 'NR>2 {print $3}' | grep \"^$cur\" || echo \"\")\n");
+ script.push_str(" if [[ -n \"$patch_ids\" ]]; then\n");
+ script.push_str(
+ " COMPREPLY=($(compgen -W \"$patch_ids\" -- \"$cur\"))\n",
+ );
+ script.push_str(" else\n");
+ script.push_str(
+ " COMPREPLY=($(compgen -W \"$options\" -- \"$cur\"))\n",
+ );
+ script.push_str(" fi\n");
+ }
+ DynamicCompletionType::IssueIds => {
+ script.push_str(" # Dynamic completion for issue IDs\n");
+ script.push_str(" local issue_ids=$(rad issue list 2>/dev/null | awk 'NR>2 {print $3}' | grep \"^$cur\" || echo \"\")\n");
+ script.push_str(" if [[ -n \"$issue_ids\" ]]; then\n");
+ script.push_str(
+ " COMPREPLY=($(compgen -W \"$issue_ids\" -- \"$cur\"))\n",
+ );
+ script.push_str(" else\n");
+ script.push_str(
+ " COMPREPLY=($(compgen -W \"$options\" -- \"$cur\"))\n",
+ );
+ script.push_str(" fi\n");
+ }
+ _ => {
+ script.push_str(
+ " COMPREPLY=($(compgen -W \"$options\" -- \"$cur\"))\n",
+ );
+ }
+ }
+ } else {
+ script.push_str(" COMPREPLY=($(compgen -W \"$options\" -- \"$cur\"))\n");
+ }
+
+ script.push_str(" ;;\n");
+ script.push_str(" esac\n");
+ script.push_str("}\n\n");
+
+ script
+ }
+}
+
+impl Default for CommandRegistry {
+ fn default() -> Self {
+ Self::init()
+ }
+}
+
+/// Initialize the command registry
+pub fn init_command_registry() -> CommandRegistry {
+ CommandRegistry::init()
+}
diff --git a/crates/radicle-cli/src/lib.rs b/crates/radicle-cli/src/lib.rs
index 88660339..c4682d64 100644
--- a/crates/radicle-cli/src/lib.rs
+++ b/crates/radicle-cli/src/lib.rs
@@ -2,6 +2,7 @@
#![allow(clippy::or_fun_call)]
#![allow(clippy::too_many_arguments)]
pub mod commands;
+pub mod completion;
pub mod git;
pub mod node;
pub mod pager;
diff --git a/crates/radicle-cli/src/main.rs b/crates/radicle-cli/src/main.rs
index 4f136d8a..c9fa589d 100644
--- a/crates/radicle-cli/src/main.rs
+++ b/crates/radicle-cli/src/main.rs
@@ -6,6 +6,7 @@ use anyhow::anyhow;
use radicle::version::Version;
use radicle_cli::commands::*;
+
use radicle_cli::terminal as term;
pub const NAME: &str = "rad";
@@ -170,6 +171,13 @@ fn run_other(exe: &str, args: &[OsString]) -> Result<(), Option<anyhow::Error>>
args.to_vec(),
);
}
+ "completion" => {
+ term::run_command_args::<rad_completion::Options, _>(
+ rad_completion::HELP,
+ rad_completion::run,
+ args.to_vec(),
+ );
+ }
"config" => {
term::run_command_args::<rad_config::Options, _>(
rad_config::HELP,
Exit code: 0
shell: 'cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny warnings cargo build --all-targets --workspace cargo doc --workspace --no-deps cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 846672d4-5bfa-4872-b00f-4206c44dd1db -v /opt/radcis/ci.rad.levitte.org/cci/state/846672d4-5bfa-4872-b00f-4206c44dd1db/s:/846672d4-5bfa-4872-b00f-4206c44dd1db/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/846672d4-5bfa-4872-b00f-4206c44dd1db/w:/846672d4-5bfa-4872-b00f-4206c44dd1db/w -w /846672d4-5bfa-4872-b00f-4206c44dd1db/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /846672d4-5bfa-4872-b00f-4206c44dd1db/s/script.sh
time="2025-09-09T15:21:50+02:00" level=error msg="User-selected graph driver \"overlay\" overwritten by graph driver \"vfs\" from database - delete libpod local files (\"/opt/radcis/ci.rad.levitte.org/.local/share/containers/storage\") to resolve. May prevent use of images created by other tools"
time="2025-09-09T15:21:50+02:00" level=error msg="User-selected graph driver \"overlay\" overwritten by graph driver \"vfs\" from database - delete libpod local files (\"/opt/radcis/ci.rad.levitte.org/.local/share/containers/storage\") to resolve. May prevent use of images created by other tools"
+ cargo --version
info: syncing channel updates for '1.88-x86_64-unknown-linux-gnu'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
cargo 1.88.0 (873a06493 2025-05-10)
+ rustc --version
rustc 1.88.0 (6b00bc388 2025-06-23)
+ cargo fmt --check
+ cargo clippy --all-targets --workspace -- --deny warnings
Updating crates.io index
Downloading crates ...
Downloaded ct-codecs v1.1.1
Downloaded errno v0.3.13
Downloaded backtrace v0.3.75
Downloaded amplify_derive v4.0.0
Downloaded shlex v1.3.0
Downloaded serde v1.0.219
Downloaded overload v0.1.1
Downloaded lazy_static v1.5.0
Downloaded outref v0.5.2
Downloaded aes v0.8.4
Downloaded opaque-debug v0.3.1
Downloaded num-iter v0.1.45
Downloaded num-complex v0.4.6
Downloaded amplify v4.6.0
Downloaded num-traits v0.2.19
Downloaded num-cmp v0.1.0
Downloaded num-integer v0.1.46
Downloaded num-bigint-dig v0.8.4
Downloaded fraction v0.15.3
Downloaded aho-corasick v1.1.3
Downloaded pretty_assertions v1.4.0
Downloaded os_info v3.12.0
Downloaded ahash v0.8.11
Downloaded p256 v0.13.2
Downloaded once_cell v1.21.3
Downloaded cpufeatures v0.2.12
Downloaded block-padding v0.3.3
Downloaded blowfish v0.9.1
Downloaded aes-gcm v0.10.3
Downloaded tree-sitter-language v0.1.2
Downloaded object v0.36.7
Downloaded signal-hook-mio v0.2.4
Downloaded schemars v1.0.4
Downloaded rustc-demangle v0.1.26
Downloaded radicle-std-ext v0.1.0
Downloaded faster-hex v0.9.0
Downloaded rand_chacha v0.3.1
Downloaded qcheck-macros v1.0.0
Downloaded salsa20 v0.10.2
Downloaded escargot v0.5.10
Downloaded displaydoc v0.2.5
Downloaded data-encoding v2.5.0
Downloaded ecdsa v0.16.9
Downloaded anstyle v1.0.6
Downloaded erased-serde v0.4.6
Downloaded fastrand v2.1.0
Downloaded regex v1.11.1
Downloaded sha1_smol v1.0.0
Downloaded quote v1.0.36
Downloaded sem_safe v0.2.0
Downloaded signal-hook v0.3.18
Downloaded unicode-display-width v0.3.0
Downloaded gix-tempfile v15.0.0
Downloaded iana-time-zone v0.1.60
Downloaded human-panic v2.0.3
Downloaded fancy-regex v0.14.0
Downloaded nu-ansi-term v0.46.0
Downloaded thiserror v2.0.12
Downloaded newline-converter v0.3.0
Downloaded signature v2.2.0
Downloaded spin v0.9.8
Downloaded icu_properties_data v1.5.1
Downloaded serde_derive_internals v0.29.1
Downloaded lexopt v0.3.0
Downloaded utf8parse v0.2.1
Downloaded similar v2.5.0
Downloaded getrandom v0.2.15
Downloaded url v2.5.4
Downloaded gix-negotiate v0.17.0
Downloaded gix-fs v0.12.1
Downloaded gix-hash v0.15.1
Downloaded gix-hashtable v0.6.0
Downloaded gix-lock v15.0.1
Downloaded unicode-normalization v0.1.23
Downloaded icu_locid_transform_data v1.5.1
Downloaded icu_normalizer_data v1.5.1
Downloaded icu_normalizer v1.5.0
Downloaded icu_locid v1.5.0
Downloaded sqlite3-sys v0.15.2
Downloaded uuid v1.16.0
Downloaded git-ref-format-macro v0.3.1
Downloaded git-ref-format v0.3.1
Downloaded icu_collections v1.5.0
Downloaded zerofrom v0.1.6
Downloaded litrs v0.4.1
Downloaded uuid-simd v0.8.0
Downloaded mio v1.0.4
Downloaded zeroize v1.7.0
Downloaded stable_deref_trait v1.2.0
Downloaded walkdir v2.5.0
Downloaded gix-refspec v0.27.0
Downloaded thiserror v1.0.69
Downloaded gix-traverse v0.43.1
Downloaded tinystr v0.7.6
Downloaded subtle v2.5.0
Downloaded hashbrown v0.14.3
Downloaded itoa v1.0.11
Downloaded io-reactor v0.5.2
Downloaded toml_writer v1.0.2
Downloaded tinyvec v1.6.0
Downloaded tempfile v3.10.1
Downloaded lock_api v0.4.11
Downloaded tree-sitter-css v0.23.1
Downloaded p384 v0.13.0
Downloaded gix-date v0.9.4
Downloaded maybe-async v0.2.10
Downloaded gix-quote v0.4.15
Downloaded gix-config-value v0.14.12
Downloaded thread_local v1.1.9
Downloaded gix-ref v0.49.1
Downloaded gix-chunk v0.4.11
Downloaded gix-utils v0.1.14
Downloaded gix-command v0.4.1
Downloaded gix-url v0.28.2
Downloaded tracing-subscriber v0.3.19
Downloaded tree-sitter-go v0.23.4
Downloaded tar v0.4.40
Downloaded libm v0.2.8
Downloaded winnow v0.6.26
Downloaded zerovec v0.10.4
Downloaded indexmap v2.2.6
Downloaded tree-sitter-python v0.23.4
Downloaded rustix v0.38.34
Downloaded vcpkg v0.2.15
Downloaded gimli v0.31.1
Downloaded inquire v0.7.5
Downloaded memchr v2.7.2
Downloaded tree-sitter-c v0.23.2
Downloaded syn v1.0.109
Downloaded tree-sitter v0.24.4
Downloaded tree-sitter-md v0.3.2
Downloaded zerocopy v0.7.35
Downloaded tracing v0.1.41
Downloaded tree-sitter-bash v0.23.3
Downloaded tree-sitter-ruby v0.23.1
Downloaded regex-automata v0.4.9
Downloaded gix-diff v0.49.0
Downloaded ssh-key v0.6.6
Downloaded log v0.4.27
Downloaded gix-credentials v0.26.0
Downloaded sha3 v0.10.8
Downloaded toml v0.9.5
Downloaded inout v0.1.3
Downloaded gix-prompt v0.9.1
Downloaded gix-commitgraph v0.25.1
Downloaded regex-syntax v0.6.29
Downloaded idna v1.0.3
Downloaded unicode-segmentation v1.11.0
Downloaded libc v0.2.174
Downloaded matchers v0.1.0
Downloaded gix-protocol v0.47.0
Downloaded toml_datetime v0.7.0
Downloaded tree-sitter-typescript v0.23.2
Downloaded tree-sitter-highlight v0.24.4
Downloaded gix-shallow v0.1.0
Downloaded gix-sec v0.10.12
Downloaded tinyvec_macros v0.1.1
Downloaded thiserror-impl v2.0.12
Downloaded thiserror-impl v1.0.69
Downloaded yoke v0.7.5
Downloaded utf16_iter v1.0.5
Downloaded typeid v1.0.3
Downloaded tracing-core v0.1.34
Downloaded syn v2.0.89
Downloaded test-log v0.2.18
Downloaded yoke-derive v0.7.5
Downloaded vsimd v0.8.0
Downloaded version_check v0.9.4
Downloaded git2 v0.19.0
Downloaded test-log-macros v0.2.18
Downloaded icu_properties v1.5.1
Downloaded localtime v1.3.1
Downloaded litemap v0.7.5
Downloaded gix-revwalk v0.17.0
Downloaded num-bigint v0.4.6
Downloaded radicle-surf v0.22.0
Downloaded linux-raw-sys v0.9.4
Downloaded write16 v1.0.0
Downloaded idna_adapter v1.2.0
Downloaded group v0.13.0
Downloaded gix-validate v0.9.4
Downloaded gix-revision v0.31.1
Downloaded gix-actor v0.33.2
Downloaded universal-hash v0.5.1
Downloaded libgit2-sys v0.17.0+1.8.1
Downloaded ssh-encoding v0.2.0
Downloaded gix-object v0.46.1
Downloaded jsonschema v0.30.0
Downloaded regex-syntax v0.8.5
Downloaded tree-sitter-html v0.23.2
Downloaded linux-raw-sys v0.4.13
Downloaded miniz_oxide v0.8.8
Downloaded git-ref-format-core v0.3.1
Downloaded zerofrom-derive v0.1.6
Downloaded unicode-width v0.1.11
Downloaded unicode-ident v1.0.12
Downloaded typenum v1.17.0
Downloaded tree-sitter-json v0.24.8
Downloaded mio v0.8.11
Downloaded num v0.4.3
Downloaded normalize-line-endings v0.3.0
Downloaded nonempty v0.9.0
Downloaded nonempty v0.5.0
Downloaded noise-framework v0.4.0
Downloaded netservices v0.8.0
Downloaded multibase v0.9.1
Downloaded memmap2 v0.9.4
Downloaded icu_locid_transform v1.5.0
Downloaded p521 v0.13.3
Downloaded yansi v0.5.1
Downloaded hmac v0.12.1
Downloaded ghash v0.5.1
Downloaded xattr v1.3.1
Downloaded tracing-log v0.2.0
Downloaded rand v0.8.5
Downloaded tree-sitter-rust v0.23.2
Downloaded rsa v0.9.6
Downloaded socket2 v0.5.7
Downloaded gix-features v0.39.1
Downloaded getrandom v0.3.3
Downloaded fxhash v0.2.1
Downloaded zerovec-derive v0.10.3
Downloaded systemd-journal-logger v2.2.2
Downloaded synstructure v0.13.1
Downloaded icu_provider v1.5.0
Downloaded generic-array v0.14.7
Downloaded writeable v0.5.5
Downloaded utf8_iter v1.0.4
Downloaded timeago v0.4.2
Downloaded streaming-iterator v0.1.9
Downloaded signals_receipts v0.2.0
Downloaded sharded-slab v0.1.7
Downloaded serde_derive v1.0.219
Downloaded rustix v1.0.7
Downloaded tree-sitter-toml-ng v0.6.0
Downloaded ssh-cipher v0.2.0
Downloaded jiff v0.2.1
Downloaded keccak v0.1.5
Downloaded prodash v29.0.2
Downloaded proc-macro-error v1.0.4
Downloaded pkcs8 v0.10.2
Downloaded sqlite3-src v0.5.1
Downloaded base32 v0.4.0
Downloaded snapbox v0.4.17
Downloaded smallvec v1.13.2
Downloaded sha2 v0.10.8
Downloaded parking_lot v0.12.3
Downloaded signal-hook-registry v1.4.5
Downloaded shell-words v1.1.0
Downloaded pem-rfc7468 v0.7.0
Downloaded icu_provider_macros v1.5.0
Downloaded schemars_derive v1.0.4
Downloaded referencing v0.30.0
Downloaded pkcs1 v0.7.5
Downloaded pin-project-lite v0.2.16
Downloaded bloomy v1.2.0
Downloaded gix-transport v0.44.0
Downloaded gix-pack v0.56.0
Downloaded spki v0.7.3
Downloaded signature v1.6.4
Downloaded phf_shared v0.11.3
Downloaded parking_lot_core v0.9.9
Downloaded jobserver v0.1.31
Downloaded home v0.5.9
Downloaded serde_spanned v1.0.0
Downloaded rfc6979 v0.4.0
Downloaded ppv-lite86 v0.2.17
Downloaded pkg-config v0.3.30
Downloaded pbkdf2 v0.12.2
Downloaded der v0.7.9
Downloaded arc-swap v1.7.1
Downloaded gix-odb v0.66.0
Downloaded socks5-client v0.4.1
Downloaded siphasher v1.0.1
Downloaded crc32fast v1.4.0
Downloaded sqlite v0.32.0
Downloaded snapbox-macros v0.3.8
Downloaded ref-cast-impl v1.0.24
Downloaded paste v1.0.15
Downloaded gix-path v0.10.15
Downloaded gix-packetline v0.18.4
Downloaded siphasher v0.3.11
Downloaded flate2 v1.1.1
Downloaded derive_more v2.0.1
Downloaded bytes v1.10.1
Downloaded gix-trace v0.1.12
Downloaded ref-cast v1.0.24
Downloaded phf v0.11.3
Downloaded percent-encoding v2.3.1
Downloaded chacha20poly1305 v0.10.1
Downloaded popol v3.0.0
Downloaded polyval v0.6.2
Downloaded poly1305 v0.8.0
Downloaded ff v0.13.0
Downloaded env_logger v0.11.8
Downloaded ec25519 v0.1.0
Downloaded document-features v0.2.11
Downloaded diff v0.1.13
Downloaded base-x v0.2.11
Downloaded amplify_syn v2.0.1
Downloaded serde_json v1.0.140
Downloaded serde-untagged v0.1.7
Downloaded sec1 v0.7.3
Downloaded scrypt v0.11.0
Downloaded scopeguard v1.2.0
Downloaded same-file v1.0.6
Downloaded ryu v1.0.17
Downloaded regex-automata v0.1.10
Downloaded rand_core v0.6.4
Downloaded proc-macro-error-attr v1.0.4
Downloaded primeorder v0.13.6
Downloaded form_urlencoded v1.2.1
Downloaded filetime v0.2.23
Downloaded fast-glob v0.3.3
Downloaded equivalent v1.0.1
Downloaded dyn-clone v1.0.17
Downloaded digest v0.10.7
Downloaded data-encoding-macro-internal v0.1.12
Downloaded bstr v1.9.1
Downloaded crypto-bigint v0.5.5
Downloaded ctr v0.9.2
Downloaded cypheraddr v0.4.0
Downloaded crossterm v0.25.0
Downloaded base64 v0.21.7
Downloaded bit-vec v0.8.0
Downloaded base64ct v1.6.0
Downloaded libz-sys v1.1.16
Downloaded anstyle-query v1.0.2
Downloaded derive_more-impl v2.0.1
Downloaded crypto-common v0.1.6
Downloaded convert_case v0.7.1
Downloaded anyhow v1.0.82
Downloaded radicle-git-ext v0.8.1
Downloaded qcheck v1.0.0
Downloaded dunce v1.0.5
Downloaded const-oid v0.9.6
Downloaded borrow-or-share v0.2.2
Downloaded env_filter v0.1.3
Downloaded fluent-uri v0.3.2
Downloaded elliptic-curve v0.13.8
Downloaded ed25519 v1.5.3
Downloaded crossbeam-utils v0.8.19
Downloaded colorchoice v1.0.0
Downloaded cipher v0.4.4
Downloaded chrono v0.4.38
Downloaded cfg-if v1.0.0
Downloaded bcrypt-pbkdf v0.10.0
Downloaded base16ct v0.2.0
Downloaded autocfg v1.2.0
Downloaded amplify_num v0.5.2
Downloaded proc-macro2 v1.0.92
Downloaded emojis v0.6.4
Downloaded email_address v0.2.9
Downloaded either v1.11.0
Downloaded cyphernet v0.5.2
Downloaded crossbeam-channel v0.5.15
Downloaded base64 v0.22.1
Downloaded anstyle-parse v0.2.3
Downloaded cbc v0.1.2
Downloaded bytesize v2.0.1
Downloaded byteorder v1.5.0
Downloaded bit-set v0.8.0
Downloaded base64 v0.13.1
Downloaded ascii v1.1.0
Downloaded data-encoding-macro v0.1.14
Downloaded crossterm v0.29.0
Downloaded chacha20 v0.9.1
Downloaded cc v1.2.2
Downloaded bitflags v2.9.1
Downloaded num-rational v0.4.2
Downloaded bytecount v0.6.8
Downloaded block-buffer v0.10.4
Downloaded bitflags v1.3.2
Downloaded aead v0.5.2
Downloaded adler2 v2.0.0
Downloaded anstream v0.6.13
Downloaded addr2line v0.24.2
Downloaded cyphergraphy v0.3.0
Downloaded colored v2.1.0
Compiling libc v0.2.174
Compiling proc-macro2 v1.0.92
Compiling unicode-ident v1.0.12
Checking cfg-if v1.0.0
Compiling shlex v1.3.0
Compiling version_check v0.9.4
Compiling serde v1.0.219
Checking memchr v2.7.2
Compiling quote v1.0.36
Compiling syn v2.0.89
Compiling autocfg v1.2.0
Checking log v0.4.27
Compiling jobserver v0.1.31
Compiling cc v1.2.2
Checking getrandom v0.2.15
Checking smallvec v1.13.2
Checking aho-corasick v1.1.3
Compiling typenum v1.17.0
Checking regex-syntax v0.8.5
Compiling generic-array v0.14.7
Checking rand_core v0.6.4
Checking fastrand v2.1.0
Checking crypto-common v0.1.6
Checking bitflags v2.9.1
Compiling lock_api v0.4.11
Compiling parking_lot_core v0.9.9
Checking regex-automata v0.4.9
Checking scopeguard v1.2.0
Compiling synstructure v0.13.1
Checking stable_deref_trait v1.2.0
Checking subtle v2.5.0
Checking parking_lot v0.12.3
Checking once_cell v1.21.3
Compiling syn v1.0.109
Checking tinyvec_macros v0.1.1
Checking tinyvec v1.6.0
Checking zeroize v1.7.0
Checking unicode-normalization v0.1.23
Compiling serde_derive v1.0.219
Checking bstr v1.9.1
Compiling zerofrom-derive v0.1.6
Compiling yoke-derive v0.7.5
Checking zerofrom v0.1.6
Compiling zerovec-derive v0.10.3
Checking yoke v0.7.5
Compiling displaydoc v0.2.5
Checking cpufeatures v0.2.12
Compiling crc32fast v1.4.0
Checking litemap v0.7.5
Checking zerovec v0.10.4
Compiling thiserror v2.0.12
Compiling icu_locid_transform_data v1.5.1
Checking writeable v0.5.5
Compiling icu_provider_macros v1.5.0
Compiling thiserror-impl v2.0.12
Checking tinystr v0.7.6
Checking icu_locid v1.5.0
Checking block-padding v0.3.3
Compiling icu_properties_data v1.5.1
Checking icu_provider v1.5.0
Checking inout v0.1.3
Checking block-buffer v0.10.4
Compiling icu_normalizer_data v1.5.1
Checking itoa v1.0.11
Compiling pkg-config v0.3.30
Checking hashbrown v0.14.3
Checking digest v0.10.7
Checking icu_locid_transform v1.5.0
Checking cipher v0.4.4
Checking icu_collections v1.5.0
Checking write16 v1.0.0
Checking utf16_iter v1.0.5
Checking adler2 v2.0.0
Checking utf8_iter v1.0.4
Compiling thiserror v1.0.69
Checking miniz_oxide v0.8.8
Compiling thiserror-impl v1.0.69
Checking icu_properties v1.5.1
Checking percent-encoding v2.3.1
Compiling rustix v0.38.34
Checking linux-raw-sys v0.4.13
Checking sha2 v0.10.8
Checking form_urlencoded v1.2.1
Checking universal-hash v0.5.1
Checking opaque-debug v0.3.1
Compiling vcpkg v0.2.15
Compiling amplify_syn v2.0.1
Checking icu_normalizer v1.5.0
Compiling libz-sys v1.1.16
Checking idna_adapter v1.2.0
Checking idna v1.0.3
Compiling data-encoding v2.5.0
Checking gix-trace v0.1.12
Checking url v2.5.4
Checking tempfile v3.10.1
Compiling amplify_derive v4.0.0
Checking ascii v1.1.0
Checking amplify_num v0.5.2
Compiling data-encoding-macro-internal v0.1.12
Checking signature v1.6.4
Checking data-encoding-macro v0.1.14
Checking ed25519 v1.5.3
Compiling libgit2-sys v0.17.0+1.8.1
Checking faster-hex v0.9.0
Checking aead v0.5.2
Compiling num-traits v0.2.19
Compiling proc-macro-error-attr v1.0.4
Checking byteorder v1.5.0
Checking ct-codecs v1.1.1
Checking base-x v0.2.11
Checking multibase v0.9.1
Checking ec25519 v0.1.0
Checking poly1305 v0.8.0
Checking chacha20 v0.9.1
Checking gix-utils v0.1.14
Compiling proc-macro-error v1.0.4
Checking amplify v4.6.0
Checking cyphergraphy v0.3.0
Checking gix-hash v0.15.1
Checking same-file v1.0.6
Compiling crossbeam-utils v0.8.19
Checking keccak v0.1.5
Checking walkdir v2.5.0
Checking sha3 v0.10.8
Checking flate2 v1.1.1
Compiling git-ref-format-core v0.3.1
Checking polyval v0.6.2
Compiling sqlite3-src v0.5.1
Checking hmac v0.12.1
Checking prodash v29.0.2
Checking base32 v0.4.0
Compiling serde_json v1.0.140
Checking equivalent v1.0.1
Checking ppv-lite86 v0.2.17
Checking base64ct v1.6.0
Checking sha1_smol v1.0.0
Checking gix-features v0.39.1
Checking pem-rfc7468 v0.7.0
Checking rand_chacha v0.3.1
Checking indexmap v2.2.6
Checking cypheraddr v0.4.0
Checking pbkdf2 v0.12.2
Checking ghash v0.5.1
Compiling git-ref-format-macro v0.3.1
Checking chacha20poly1305 v0.10.1
Checking aes v0.8.4
Checking ctr v0.9.2
Checking ryu v1.0.17
Checking aes-gcm v0.10.3
Checking git-ref-format v0.3.1
Checking noise-framework v0.4.0
Checking crossbeam-channel v0.5.15
Checking socks5-client v0.4.1
Checking rand v0.8.5
Checking ssh-encoding v0.2.0
Checking blowfish v0.9.1
Checking cbc v0.1.2
Checking home v0.5.9
Compiling ref-cast v1.0.24
Checking radicle-std-ext v0.1.0
Checking ssh-cipher v0.2.0
Checking gix-path v0.10.15
Checking bcrypt-pbkdf v0.10.0
Checking cyphernet v0.5.2
Compiling ref-cast-impl v1.0.24
Checking signature v2.2.0
Checking ssh-key v0.6.6
Checking qcheck v1.0.0
Checking radicle-ssh v0.10.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-ssh)
Compiling typeid v1.0.3
Checking lazy_static v1.5.0
Checking dyn-clone v1.0.17
Checking siphasher v1.0.1
Checking nonempty v0.9.0
Compiling serde_derive_internals v0.29.1
Checking radicle-dag v0.10.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-dag)
Checking erased-serde v0.4.6
Checking jiff v0.2.1
Compiling schemars_derive v1.0.4
Checking iana-time-zone v0.1.60
Checking chrono v0.4.38
Checking gix-date v0.9.4
Checking schemars v1.0.4
Checking serde-untagged v0.1.7
Checking colored v2.1.0
Checking bytesize v2.0.1
Checking localtime v1.3.1
Checking winnow v0.6.26
Checking tree-sitter-language v0.1.2
Checking dunce v1.0.5
Checking fast-glob v0.3.3
Checking base64 v0.21.7
Checking anstyle-query v1.0.2
Checking gix-hashtable v0.6.0
Checking gix-validate v0.9.4
Checking utf8parse v0.2.1
Checking anstyle-parse v0.2.3
Checking memmap2 v0.9.4
Checking anstyle v1.0.6
Compiling rustix v1.0.7
Checking gix-actor v0.33.2
Checking gix-object v0.46.1
Checking colorchoice v1.0.0
Checking anstream v0.6.13
Checking gix-chunk v0.4.11
Checking linux-raw-sys v0.9.4
Checking gix-commitgraph v0.25.1
Checking gix-revwalk v0.17.0
Checking gix-fs v0.12.1
Checking errno v0.3.13
Checking sem_safe v0.2.0
Checking signals_receipts v0.2.0
Checking gix-tempfile v15.0.0
Compiling signal-hook v0.3.18
Checking signal-hook-registry v1.4.5
Checking shell-words v1.1.0
Compiling getrandom v0.3.3
Checking gix-command v0.4.1
Checking radicle-signals v0.11.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-signals)
Compiling tree-sitter v0.24.4
Checking mio v0.8.11
Checking mio v1.0.4
Compiling unicode-segmentation v1.11.0
Compiling anyhow v1.0.82
Compiling convert_case v0.7.1
Checking signal-hook-mio v0.2.4
Checking gix-lock v15.0.1
Checking sqlite3-sys v0.15.2
Checking gix-url v0.28.2
Checking gix-config-value v0.14.12
Checking sqlite v0.32.0
Checking gix-quote v0.4.15
Checking regex v1.11.1
Checking gix-sec v0.10.12
Checking gix-prompt v0.9.1
Checking uuid v1.16.0
Compiling xattr v1.3.1
Compiling derive_more-impl v2.0.1
Compiling filetime v0.2.23
Checking gix-traverse v0.43.1
Checking gix-revision v0.31.1
Checking gix-diff v0.49.0
Checking gix-packetline v0.18.4
Checking lexopt v0.3.0
Compiling object v0.36.7
Checking bitflags v1.3.2
Compiling litrs v0.4.1
Checking derive_more v2.0.1
Checking crossterm v0.25.0
Checking gix-transport v0.44.0
Checking gix-pack v0.56.0
Compiling document-features v0.2.11
Checking gix-refspec v0.27.0
Compiling tar v0.4.40
Checking newline-converter v0.3.0
Checking gix-credentials v0.26.0
Checking gix-ref v0.49.1
Checking gix-shallow v0.1.0
Checking gix-negotiate v0.17.0
Checking fxhash v0.2.1
Compiling maybe-async v0.2.10
Checking unicode-width v0.1.11
Checking arc-swap v1.7.1
Checking gimli v0.31.1
Checking streaming-iterator v0.1.9
Checking gix-protocol v0.47.0
Checking gix-odb v0.66.0
Checking inquire v0.7.5
Compiling radicle-surf v0.22.0
Checking crossterm v0.29.0
Checking addr2line v0.24.2
Checking unicode-display-width v0.3.0
Checking toml_datetime v0.7.0
Checking serde_spanned v1.0.0
Compiling tree-sitter-c v0.23.2
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-rust v0.23.2
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-python v0.23.4
Compiling tree-sitter-css v0.23.1
Compiling tree-sitter-go v0.23.4
Checking toml_writer v1.0.2
Checking either v1.11.0
Checking rustc-demangle v0.1.26
Checking toml v0.9.5
Checking backtrace v0.3.75
Checking snapbox-macros v0.3.8
Checking salsa20 v0.10.2
Checking os_info v3.12.0
Compiling radicle-cli v0.16.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-cli)
Checking nonempty v0.5.0
Checking base64 v0.13.1
Checking similar v2.5.0
Checking siphasher v0.3.11
Checking normalize-line-endings v0.3.0
Checking bloomy v1.2.0
Checking human-panic v2.0.3
Checking snapbox v0.4.17
Checking scrypt v0.11.0
Checking tree-sitter-highlight v0.24.4
Checking systemd-journal-logger v2.2.2
Checking popol v3.0.0
Checking bytes v1.10.1
Checking timeago v0.4.2
Checking io-reactor v0.5.2
Checking socket2 v0.5.7
Checking diff v0.1.13
Checking yansi v0.5.1
Compiling radicle-node v0.15.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-node)
Checking pretty_assertions v1.4.0
Checking netservices v0.8.0
Checking radicle-systemd v0.10.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-systemd)
Checking num-integer v0.1.46
Compiling escargot v0.5.10
Compiling qcheck-macros v1.0.0
Checking num-bigint v0.4.6
Compiling ahash v0.8.11
Compiling radicle-remote-helper v0.13.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-remote-helper)
Checking num-iter v0.1.45
Checking num-complex v0.4.6
Checking num-rational v0.4.2
Checking env_filter v0.1.3
Checking borrow-or-share v0.2.2
Checking zerocopy v0.7.35
Checking bit-vec v0.8.0
Checking fluent-uri v0.3.2
Checking bit-set v0.8.0
Checking env_logger v0.11.8
Checking num v0.4.3
Checking phf_shared v0.11.3
Compiling test-log-macros v0.2.18
Checking outref v0.5.2
Compiling paste v1.0.15
Checking vsimd v0.8.0
Checking phf v0.11.3
Checking referencing v0.30.0
Checking test-log v0.2.18
Checking uuid-simd v0.8.0
Checking fraction v0.15.3
Checking fancy-regex v0.14.0
Checking email_address v0.2.9
Checking num-cmp v0.1.0
Checking base64 v0.22.1
Checking bytecount v0.6.8
Checking emojis v0.6.4
Checking jsonschema v0.30.0
Checking git2 v0.19.0
Checking radicle-git-ext v0.8.1
Checking radicle-term v0.15.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-term)
Checking radicle-crypto v0.13.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-crypto)
Checking radicle-cob v0.16.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-cob)
Checking radicle v0.19.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle)
Checking radicle-fetch v0.15.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-fetch)
Checking radicle-cli-test v0.13.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-cli-test)
Checking radicle-protocol v0.3.0 (/846672d4-5bfa-4872-b00f-4206c44dd1db/w/crates/radicle-protocol)
error: variables can be used directly in the `format!` string
--> crates/radicle-cli/src/commands/completion.rs:55:13
|
55 | println!("{}", completion_script);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-D clippy::uninlined-format-args` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]`
help: change this to
|
55 - println!("{}", completion_script);
55 + println!("{completion_script}");
|
error: calling `push_str()` using a single-character string literal
--> crates/radicle-cli/src/completion.rs:329:21
|
329 | script.push_str(" ");
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `script.push(' ')`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
= note: `-D clippy::single-char-add-str` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_char_add_str)]`
error: variables can be used directly in the `format!` string
--> crates/radicle-cli/src/completion.rs:351:30
|
351 | script.push_str(&format!(" {})\n", name));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
351 - script.push_str(&format!(" {})\n", name));
351 + script.push_str(&format!(" {name})\n"));
|
error: variables can be used directly in the `format!` string
--> crates/radicle-cli/src/completion.rs:352:30
|
352 | script.push_str(&format!(" _rad_{}\n", name));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
352 - script.push_str(&format!(" _rad_{}\n", name));
352 + script.push_str(&format!(" _rad_{name}\n"));
|
error: variables can be used directly in the `format!` string
--> crates/radicle-cli/src/completion.rs:375:26
|
375 | script.push_str(&format!("_rad_{}() {{\n", name));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
375 - script.push_str(&format!("_rad_{}() {{\n", name));
375 + script.push_str(&format!("_rad_{name}() {{\n"));
|
error: could not compile `radicle-cli` (lib) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
Exit code: 101
{
"response": "finished",
"result": "failure"
}