Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: port from zig to go #50

Draft
wants to merge 99 commits into
base: main
Choose a base branch
from
Draft

chore: port from zig to go #50

wants to merge 99 commits into from

Conversation

water-sucks
Copy link
Owner

No description provided.

Completion for flags does not have to be handrolled here, and I can use
the same struct strategies. I will have to rethink context usage, but
this will work in the long run, considering the track record of GitHub
CLI (gh) and Hugo and other large applications using Cobra.
Well, turns out making --config and --color-always persistent flags
broke other commands using "-c" and "-C" shorthands, so I
removed them for now, since they should be rather uncommon to use
for most people.

Also, I forgor to update the Nix hash. Oops. I fucked up. Lol.
This is rather buggy when the option argument is empty, but I'll worry
about it later.
This makes more sense for the scoring scheme for the fuzzy package being
used. Originally when using `zf` in Zig, this would return higher
numbers for less relevant results; this is the opposite, and only uses
integers, while also allowing negative numbers for very irrelevant
results.
@water-sucks water-sucks force-pushed the rewrite branch 2 times, most recently from 2addc2c to 76b3c6a Compare February 17, 2025 16:19
@water-sucks water-sucks force-pushed the rewrite branch 2 times, most recently from e7a51a9 to 566be0f Compare February 22, 2025 04:36
@water-sucks water-sucks force-pushed the rewrite branch 2 times, most recently from db15fa6 to 9e4d942 Compare February 22, 2025 05:08
The name "config" for the settings for `nixos-cli` is rather confusing.
Change it to `settings`
Flags like --max-jobs can also take zero as a valid value, and this
was impossible to pass on the command line earlier, since 0 is the
zero value and can also mean "unset". This differentiates them based
on if it was parsed in Cobra or not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant