Skip to content

Fix TODO items and shell script best practices#158

Merged
Ven0m0 merged 1 commit intomainfrom
claude/resolve-todos-issues-qbH8s
Jan 13, 2026
Merged

Fix TODO items and shell script best practices#158
Ven0m0 merged 1 commit intomainfrom
claude/resolve-todos-issues-qbH8s

Conversation

@Ven0m0
Copy link
Copy Markdown
Owner

@Ven0m0 Ven0m0 commented Jan 13, 2026

Resolve straightforward tasks from in-code TODOs and shell standards:

  • mpv.conf: Resolve scaling TODO, use ewa_lanczossharp for best quality
  • appImage_to_desktop.sh: Add -u flag to set, quote variables per standards
  • killwine.sh: Rewrite with proper error handling, use mapfile, avoid unsafe patterns
  • proton-cachyos.sh: Fix shebang to #!/usr/bin/env bash, add set -euo pipefail

All changes align with repo standards: proper error handling, quoted variables, and bash idioms per CLAUDE.md guidelines.

Resolve straightforward tasks from in-code TODOs and shell standards:

- mpv.conf: Resolve scaling TODO, use ewa_lanczossharp for best quality
- appImage_to_desktop.sh: Add -u flag to set, quote variables per standards
- killwine.sh: Rewrite with proper error handling, use mapfile, avoid unsafe patterns
- proton-cachyos.sh: Fix shebang to #!/usr/bin/env bash, add set -euo pipefail

All changes align with repo standards: proper error handling, quoted variables,
and bash idioms per CLAUDE.md guidelines.
Copilot AI review requested due to automatic review settings January 13, 2026 01:54
@continue
Copy link
Copy Markdown

continue bot commented Jan 13, 2026

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

@github-actions
Copy link
Copy Markdown

🤖 Hi @Ven0m0, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Ven0m0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the quality, robustness, and adherence to best practices across several configuration and shell script files. It addresses existing technical debt by resolving TODOs, implementing safer variable handling, and improving error management, resulting in more reliable and maintainable code.

Highlights

  • mpv.conf Quality Setting: Resolved a TODO item by setting video scaling to ewa_lanczossharp for optimal quality, suitable for modern GPUs.
  • appImage_to_desktop.sh Improvements: Enhanced script robustness by adding the -u flag to set (exiting on unset variables) and properly quoting variables to prevent word splitting issues.
  • killwine.sh Refactor: Completely rewrote the script to include proper error handling, utilize mapfile for collecting process IDs, and avoid unsafe patterns, improving its reliability.
  • Shell Script Best Practices: Updated killwine.sh and proton-cachyos.sh to use #!/usr/bin/env bash shebang and added set -euo pipefail for consistent and robust error handling across scripts.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Ven0m0 Ven0m0 merged commit 099fb40 into main Jan 13, 2026
11 of 17 checks passed
@Ven0m0 Ven0m0 deleted the claude/resolve-todos-issues-qbH8s branch January 13, 2026 01:54
@repo-command repo-command bot added the merged label Jan 13, 2026
@github-actions
Copy link
Copy Markdown

🤖 I'm sorry @Ven0m0, but I was unable to process your request. Please see the logs for more details.

Copy link
Copy Markdown
Contributor

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 resolves straightforward TODO items and applies shell script best practices across multiple configuration and script files. The changes focus on standardizing error handling, variable quoting, and resolving a configuration decision in mpv.

Changes:

  • Updated shell scripts to use portable #!/usr/bin/env bash shebang and proper set -euo pipefail flags
  • Rewrote killwine.sh with safe process handling using mapfile and proper error suppression
  • Added variable quoting in appImage_to_desktop.sh for path variables
  • Resolved mpv.conf TODO by selecting ewa_lanczossharp scaling algorithm with explanatory comment

Reviewed changes

Copilot reviewed 1 out of 4 changed files in this pull request and generated no comments.

File Description
Home/.local/bin/proton-cachyos.sh Added portable shebang and set -euo pipefail for proper error handling
Home/.local/bin/killwine.sh Complete rewrite with safe process killing using mapfile, error handling, and avoiding command substitution vulnerabilities
Home/.local/bin/appImage_to_desktop.sh Added -u flag to set command and quoted TEMP_SQUASHFS_PATH variable references
Home/.config/mpv/mpv.conf Resolved TODO by selecting ewa_lanczossharp for scale/cscale with explanatory comment

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a series of valuable improvements across configuration and shell scripts, aligning with modern best practices. The changes in mpv.conf, appImage_to_desktop.sh, and proton-cachyos.sh are solid, particularly the adoption of set -euo pipefail and proper variable quoting in the shell scripts. The rewrite of killwine.sh is a significant step up in terms of safety and correctness. I've added one suggestion to make it even more robust and idiomatic by using pkill instead of a ps | grep | awk pipeline. Overall, these are great changes that enhance the quality and reliability of the scripts.

Comment on lines +11 to +14
mapfile -t pids < <(ps -ef | grep -E -i '(wine|processid|\.exe)' | grep -v grep | awk '{print $2}')
if [[ ${#pids[@]} -gt 0 ]]; then
kill -9 "${pids[@]}" 2>/dev/null || true
fi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The logic for finding and killing processes can be significantly simplified and made more robust by using pkill. This single command can replace the mapfile, ps, grep, awk, if, and kill combination, making the script more readable and idiomatic. pkill with the -f flag will match against the full command line, and it's designed to avoid matching itself, making it safer than a ps | grep pipeline.

Suggested change
mapfile -t pids < <(ps -ef | grep -E -i '(wine|processid|\.exe)' | grep -v grep | awk '{print $2}')
if [[ ${#pids[@]} -gt 0 ]]; then
kill -9 "${pids[@]}" 2>/dev/null || true
fi
pkill -f -9 -i 'wine|processid|\.exe' 2>/dev/null || true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants