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

Basic support for lazydocker #3138

Merged
merged 5 commits into from
Aug 11, 2023
Merged

Basic support for lazydocker #3138

merged 5 commits into from
Aug 11, 2023

Conversation

EmilyGraceSeville7cf
Copy link
Contributor

Note that not all properties are supported now, just those mentioned here directly. For that reason, no "additionalProperties": false appear.

@EmilyGraceSeville7cf EmilyGraceSeville7cf changed the title Basic support for lazygit Basic support for lazydocker Aug 11, 2023
@EmilyGraceSeville7cf
Copy link
Contributor Author

EmilyGraceSeville7cf commented Aug 11, 2023

The following Nushell code has been used to speed up schema creation:

# Converts JSON to JSON schema.
def to-properties [json: string, url: string] {
    $json | jq 'def to_title: . | gsub("(?<x>[A-Z])"; " \(.x)") | ascii_downcase;

        with_entries(.value = {
            title: (.key | to_title),
            description: (if .value | type != "boolean" then
                if .key | test("^[aeiou]"; "i") then
                    "An "
                else
                    "A "
                end
            else
                "Whether to "
            end + (.key | to_title) + "\n" + $url),
            type: .value | type,
            default: .value
        })' --arg url $url |
        xclip -selection clipboard
}

As config is in YAML it should be converted to JSON at first.

@madskristensen
Copy link
Contributor

Thanks

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