Skip to content

Refactor completion commands#1

Merged
cecheta merged 1 commit into
masterfrom
refactor
May 29, 2026
Merged

Refactor completion commands#1
cecheta merged 1 commit into
masterfrom
refactor

Conversation

@cecheta
Copy link
Copy Markdown
Owner

@cecheta cecheta commented May 29, 2026

No description provided.

Copy link
Copy Markdown

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

Refactors the per-command completion blocks in install.sh into a single data-driven loop that iterates over a list of commands and dispatches to a generate_completion() function. Also switches the script from /bin/sh to Bash with set -euo pipefail.

Changes:

  • Replaced five repetitive if command -v ... blocks with a cmds array and a shared loop.
  • Added a generate_completion() function with a case statement mapping each command to its zsh-completion invocation.
  • Switched shebang to #!/usr/bin/env bash and enabled set -euo pipefail; added an explicit mkdir -p for the site-functions directory.
Show a summary per file
File Description
install.sh Consolidates completion generation into an array + loop + case dispatch and hardens shell options.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread install.sh Outdated
Comment thread install.sh
Copy link
Copy Markdown

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.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

@cecheta cecheta merged commit 51faba8 into master May 29, 2026
1 check passed
@cecheta cecheta deleted the refactor branch May 29, 2026 17:53
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