Skip to content

Add shell completions using clap_complete#735

Draft
yedayak wants to merge 1 commit intoWilfred:masterfrom
yedayak:shell-completion
Draft

Add shell completions using clap_complete#735
yedayak wants to merge 1 commit intoWilfred:masterfrom
yedayak:shell-completion

Conversation

@yedayak
Copy link
Copy Markdown
Contributor

@yedayak yedayak commented Jul 17, 2024

This uses the last 3.x clap_complete version, which matches the currently used clap version (regarding MSRV).

Note the TODO I left, not sure what to do about that.

@Wilfred
Copy link
Copy Markdown
Owner

Wilfred commented Apr 18, 2026

Thanks for taking the time to create a PR, and sorry for the slow response!

Whilst the vast majority of difft usage is (I presume) difft old.js new.js or using it in git, there are a bunch of flags when you do --help. So this is probably a small but real improvement.

If you'd like to rebase this I'd be happy to merge it :)

@yedayak yedayak marked this pull request as draft April 19, 2026 18:52
@yedayak
Copy link
Copy Markdown
Contributor Author

yedayak commented Apr 19, 2026

I rebased but there is some issue with the package version and rust edition, didn't look into it. In general I tested this again and it seemed to have an unfortunate side effect of not completing paths by default, only if you start a path. For example type difft <TAB> only completes flags, you have to do difft ./<TAB> to see files. This is testing in bash, might be better in fish/zsh.
I think this arguably might be a worse experience, open to input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants