Skip to content

Add shell-completions for dx#5232

Draft
sermuns wants to merge 1 commit intoDioxusLabs:mainfrom
sermuns:shell-completions
Draft

Add shell-completions for dx#5232
sermuns wants to merge 1 commit intoDioxusLabs:mainfrom
sermuns:shell-completions

Conversation

@sermuns
Copy link
Copy Markdown
Contributor

@sermuns sermuns commented Jan 17, 2026

I followed the simple example from https://github.com/clap-rs/clap/blob/master/clap_complete/examples/completion-derive.rs.

Problem is, the main command seems to be too big, causing a runtime stack overflow when trying to generate completions...

$ cargo run -- completions bash
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.62s
     Running `/home/sermuns/.cache/cargo/debug/dx completions bash`

thread 'main' (2234839) has overflowed its stack
fatal runtime error: stack overflow, aborting
$ cargo run --release -- completions bash
   Compiling dioxus-cli v0.7.3 (/home/sermuns/Git/dioxus/packages/cli)
    Finished `release` profile [optimized] target(s) in 9.92s
     Running `/home/sermuns/.cache/cargo/release/dx completions bash`

thread 'main' (2234993) has overflowed its stack
fatal runtime error: stack overflow, aborting

Fixes #5061 (once I have figured out a solution for the stack overflow...)

@ealmloff
Copy link
Copy Markdown
Member

That may be caused by the @server and @client subcommands which use ChainedCommand to match recursively

@sermuns
Copy link
Copy Markdown
Contributor Author

sermuns commented Jan 19, 2026

Sounds like a reasonable culprit, let me investigate.

@jkelleyrtp jkelleyrtp added the cli Related to the dioxus-cli program label Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to the dioxus-cli program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add shell-completions

3 participants