Skip to content

fish complete: add --logo-color-[1-9] completion #1754

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

Merged
merged 2 commits into from
May 15, 2025

Conversation

AtifChy
Copy link
Contributor

@AtifChy AtifChy commented May 14, 2025

Added fish completion support for --logo-color-[1-9] flag.

@CarterLi CarterLi requested a review from Copilot May 15, 2025 01:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces fish shell completion support for the "--logo-color-[1-9]" flag, ensuring that each color flag (1 through 9) is individually handled.

  • Uses a loop to generate individual completions for each logo-color value.
  • Splits multi-imports into separate statements and improves error handling by catching and printing the exception.


def main():
data: dict[str, list[dict]] = json.loads(subprocess.check_output(["fastfetch", "--help-raw"]))

for key in data:
for flag in data[key]:
if flag["long"] == "logo-color-[1-9]":
Copy link
Preview

Copilot AI May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding an inline comment explaining that the loop generates distinct completions for logo-color flags (1-9) to improve clarity for future maintainers.

Copilot uses AI. Check for mistakes.

@AtifChy
Copy link
Contributor Author

AtifChy commented May 15, 2025

@CarterLi I reverted the changes you mentioned.

@CarterLi CarterLi merged commit c054570 into fastfetch-cli:dev May 15, 2025
19 checks passed
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