Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Generate completions for each multicall binary #216

Merged
merged 1 commit into from Nov 28, 2022

Conversation

swsnr
Copy link
Owner

@swsnr swsnr commented Nov 28, 2022

Fixes completions for mdcat and additional generates completions for mdless.

Closes GH-214

@swsnr swsnr self-assigned this Nov 28, 2022
@swsnr swsnr force-pushed the generate-completions-for-each-multicall-binary branch 2 times, most recently from 4192672 to 15617cc Compare November 28, 2022 19:42
@swsnr swsnr enabled auto-merge November 28, 2022 19:44
@swsnr swsnr force-pushed the generate-completions-for-each-multicall-binary branch from 15617cc to 8f9e830 Compare November 28, 2022 19:45
We used to generate completions for the top-level command, but that's
not correct in a multicall binary: It includes the subcommands as
completable arguments, whereas we actually need to split completions per
subcommand.

Hence, iterate over the two relevant subcommands aka binary names, and
separately generate the completion for each corresponding subcommand.

This corrects completions for mdcat, and as a bonus we now also generate
completions for mdless which we didn't have before.

Closes GH-214
@swsnr swsnr force-pushed the generate-completions-for-each-multicall-binary branch from 8f9e830 to 1c41114 Compare November 28, 2022 19:48
@swsnr swsnr merged commit e5b4522 into main Nov 28, 2022
@swsnr swsnr deleted the generate-completions-for-each-multicall-binary branch November 28, 2022 19:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant