config: refresh fish utilities - #69
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72890c83bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| end | ||
|
|
||
| function cleanup-ds-store | ||
| fd -HI ".DS_Store" -X rm |
There was a problem hiding this comment.
Match only the exact .DS_Store basename
fd --help states that its pattern is a regular expression by default, so .DS_Store also matches unrelated names such as xDS_Store and MyDS_StoreBackup; testing with fd 9.0.0 confirms that all three names are returned. Because -X rm deletes every match, invoking this cleanup helper can destroy unrelated files. Use an exact glob or an anchored, escaped expression.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 8812acd. The pattern is now anchored and the dot is escaped (^\.DS_Store$), so only the exact .DS_Store basename is matched. I also verified that names such as xDS_Store and MyDS_StoreBackup are excluded.
| @@ -1,3 +1,3 @@ | |||
| function brew-upgrade --description "Upgrade, autoremove, and cleanup Homebrew" | |||
| brew upgrade; brew autoremove; brew cleanup --prune=all | |||
| brew upgrade -y; brew autoremove; brew cleanup --prune=all | |||
There was a problem hiding this comment.
Remove the unsupported -y upgrade option
When this helper runs with Homebrew, brew upgrade -y is rejected as an invalid option before any packages are upgraded; the semicolons then allow autoremove and cleanup to run anyway. The brew upgrade option list provides no -y switch, and upgrades are already non-interactive by default, so this flag makes the helper consistently fail to perform its primary operation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The current Homebrew documentation lists -y, --no-ask for brew upgrade: https://docs.brew.sh/Manpage#upgrade-options-installed_formula-installed_cask-. The local brew upgrade --help also reports -y, --no-ask, --yes, so -y is supported by the current version and will remain unchanged.
Summary
Validation
git diff --checkfish -n fish/config.fish fish/conf.d/cleanup.fish fish/conf.d/colima.fish fish/functions/brew-upgrade.fishpython3 -m py_compile initpre-commit run --all-filesgit commit