-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
water-sucks
wants to merge
99
commits into
main
Choose a base branch
from
rewrite
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
2addc2c
to
76b3c6a
Compare
e7a51a9
to
566be0f
Compare
db15fa6
to
9e4d942
Compare
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.