Common config files / perf improvements / better maintainability - #10
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR replaces dotbot-based installation with a manifest-driven zsh installer, updates shell bootstrap files, adds autoloaded zsh helpers and aliases, and revises the Brewfile package set. ChangesDotfiles Overhaul
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 11
🧹 Nitpick comments (4)
zsh/functions/autoload/kebabify (1)
15-16: 🎯 Functional Correctness | 🔵 Trivial | ⚖️ Poor tradeoffPath components in filenames will be kebab-cased.
If a user passes
path/To/MyFile.txt, the entire path is transformed topath/to/my-file.txt, thenmvattempts to rename the file to that path. This will fail unlesspath/to/exists and matches the source directory. Consider transforming only the basename:local dir basename new_name dir=$(dirname "$file") basename=$(basename "$file") new_name=$(printf '%s\n' "$basename" | sed -E 's/([a-z0-9])([A-Z])/\1-\2/g; s/_/-/g' | tr '[:upper:]' '[:lower:]') [[ "$dir" == "." ]] && new_name="$new_name" || new_name="$dir/$new_name" mv -n -- "$file" "$new_name" && echo "Renamed: $file -> $new_name"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@zsh/functions/autoload/kebabify` around lines 15 - 16, The kebabify function currently applies the kebab-case transformation to the entire filename path, which causes the mv command to fail when the directory structure doesn't exist as specified. Extract the directory and basename separately using dirname and basename functions before applying the sed and tr transformations only to the basename portion. After transforming only the basename, reconstruct the full path by prepending the original directory, then use this properly constructed path in the mv command to ensure the file is moved to the correct location within its original directory structure.zsh/functions/autoload/gmove (1)
11-11: 🎯 Functional Correctness | 🔵 Trivial | ⚖️ Poor tradeoffFilenames with spaces will break the stash command.
$(git diff --staged --name-only)expands to space-separated filenames. If any staged file contains spaces, the command will fail. Use a while-read loop or null-delimited approach:git diff --staged --name-only -z | xargs -0 git stash --or build an array:
local files=("${(`@f`)$(git diff --staged --name-only)}") git stash -- "${files[@]}"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@zsh/functions/autoload/gmove` at line 11, The current git stash command using $(git diff --staged --name-only) will fail when staged filenames contain spaces because the expansion produces space-separated arguments that are incorrectly parsed. Fix this by using a null-delimited approach with the -z flag on git diff and piping through xargs with -0 to properly handle filenames with spaces, or alternatively build an array of filenames using the array syntax and pass the array to git stash to preserve spaces in individual filenames. Either approach will safely handle the file list passed to the git stash command.zsh/aliases.zsh (1)
88-89: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueQuote command substitutions for safety.
While Git branch names cannot contain spaces, defensive quoting prevents unexpected word splitting.
♻️ Proposed fix
-function glm() { git log "$(get_default_branch)..HEAD" --graph --pretty="$_git_log_pretty" } -function glolsm() { git log "$(get_default_branch)..HEAD" --stat --pretty="$_git_log_pretty" } +function glm() { git log "$(get_default_branch)..HEAD" --graph --pretty="$_git_log_pretty" } +function glolsm() { git log "$(get_default_branch)..HEAD" --stat --pretty="$_git_log_pretty" }(Note: The command substitutions are already quoted in the current code. No change needed.)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@zsh/aliases.zsh` around lines 88 - 89, The command substitutions in both the glm and glolsm functions are already properly quoted with double quotes around $(get_default_branch), which correctly prevents unexpected word splitting. Additionally, the $_git_log_pretty variable is also properly quoted. No changes are needed as the current implementation already follows defensive quoting best practices.zsh/functions/autoload/cl (1)
9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider whether
builtin cdbypasses intended zoxide integration.Line 10 of
zsh/aliases.zshaliasescdtoz(zoxide), but this function usesbuiltin cd, which bypasses that alias. This means directories visited viaclwon't be tracked by zoxide. If that's intentional for autoload functions, this is fine; otherwise, consider usingzdirectly or plaincd(which would expand toz).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@zsh/functions/autoload/cl` at line 9, In the cl function, replace `builtin cd` with plain `cd` or `z` to allow the zoxide alias (set in zsh/aliases.zsh line 10) to take effect and properly track directory visits. The current use of `builtin cd` explicitly bypasses the alias, preventing zoxide integration for directories accessed through this autoload function.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@setup_zsh.zsh`:
- Around line 5-23: The script uses an undefined exists function and does not
validate that BREW_ZSH is an executable path before attempting to add it to
/etc/shells or use it with chsh. First, define or replace the exists function
with a standard shell check (such as using command -v). Second, after the
if-else block that sets BREW_ZSH, add a validation check to ensure the BREW_ZSH
path is executable before the grep command that checks if it exists in
/etc/shells. This prevents non-existent shell paths from being added to
/etc/shells and subsequently failing the chsh command.
In `@zsh/aliases.zsh`:
- Line 93: The bbd alias definition uses single quotes around the file path
argument, which prevents the shell from expanding the tilde character. Replace
the single quotes with double quotes or substitute the tilde with the $HOME
variable expansion in the file path. Specifically, change the file argument in
the bbd alias from --file='~/.dotfiles/Brewfile' to use either
--file="$HOME/.dotfiles/Brewfile" or another form that allows proper path
expansion before the command is executed.
In `@zsh/functions/autoload/gmove`:
- Line 12: The gmove function contains a call to gwip at line 12, but gwip is
not defined anywhere in the codebase since the oh-my-zsh git plugin was removed.
Either define the gwip function (which creates a WIP commit, typically
equivalent to git add and git commit with a WIP message) as a new function in
the zsh configuration, or replace the gwip call in gmove with the inline
equivalent git commands that create a work-in-progress commit.
In `@zsh/functions/autoload/is_script_in_package_json`:
- Around line 4-9: The is_script_in_package_json function has a security
vulnerability where the shell argument $1 is directly interpolated into the
JavaScript code string passed to node -e. Instead of embedding $1 in the quoted
JavaScript source, pass the script name as a command-line argument to the node
process (using $1 outside the -e string) and access it via process.argv within
the JavaScript code, or alternatively pass it as an environment variable and
read it from process.env. This prevents shell argument injection attacks where
quotes or special characters in the script name could break syntax or enable
code execution.
In `@zsh/functions/autoload/list_deno_tasks`:
- Line 8: The echo command on line 8 in the list_deno_tasks function directly
accesses tasks.tasks without null safety, which will throw an error if the
deno.json file lacks a tasks property. Modify the JavaScript string being passed
to deno run to use optional chaining and nullish coalescing (tasks?.tasks ?? {})
when accessing the tasks property, matching the defensive pattern already
established in the is_script_in_deno_json sibling function for consistency and
robustness.
In `@zsh/functions/autoload/run`:
- Around line 19-20: The helper function calls is_script_in_package_json at line
19 and is_script_in_deno_json at line 53 do not propagate their exit status, so
if these functions fail (e.g., due to missing Node.js/Deno or JSON parse
errors), the command substitution still succeeds with empty/invalid output and
the subsequent conditional checks cannot detect the failure. Add exit status
checks immediately after each command substitution assignment to ensure that if
is_script_in_package_json or is_script_in_deno_json fails, the script exits or
returns early before proceeding to the conditional logic.
In `@zshenv`:
- Line 20: The HOMEBREW_CASK_OPTS export with the --no-quarantine flag is
disabling macOS quarantine checks globally for all cask installations, which
weakens system security. Remove the entire export
HOMEBREW_CASK_OPTS="--no-quarantine" line from the zshenv file. If the
no-quarantine flag is needed for specific cask installations in the future, it
should be applied on a per-command basis using the flag directly in individual
install commands rather than as a global environment variable setting.
- Line 21: The NULLCMD=bat export in the zshenv file affects all zsh invocations
including non-interactive scripts, which causes unexpected behavior. Remove the
line `export NULLCMD=bat` from the zshenv file and add it instead to the zshrc
file, which zsh automatically sources only for interactive shells. This ensures
the NULLCMD setting only applies to interactive shell sessions and not to script
executions.
In `@zshrc`:
- Around line 27-31: The unquoted `$realpath` variable in the fzf-tab preview
commands on lines 27, 28, 30, and 31 (in both the eza and ls preview strings for
cd and __zoxide_z completions) will break when directory paths contain spaces.
Replace all instances of `$realpath` with `${(Q)realpath}` to properly handle
paths with spaces using Zsh's parameter expansion quoting flag. This applies to
the fzf-preview values in all four zstyle lines for both the if branch (eza
commands) and else branch (ls commands).
- Around line 47-49: The eval commands for zoxide init and fzf are running
unconditionally, causing startup failures when these binaries are missing. Wrap
the eval statements that initialize zoxide (the line with zoxide init zsh) and
fzf (the line with fzf --zsh) with conditional checks that verify each command
exists before executing the eval. Use conditional statements to check if the
binaries are available in the PATH, and only proceed with initialization if they
are found, allowing the shell to start gracefully when optional tools are not
installed.
In `@zshrc.bak`:
- Line 7: The curl command on line 7 that pipes remote content directly to bash
(curl | bash) is a security risk and should be avoided. Instead, download the
install script from the zinit repository to a temporary file first, then execute
it separately. This allows for inspection and verification of the script before
execution, reducing supply-chain security risks. Replace the piped curl command
with a two-step approach: first download the install.sh script to a temporary
location, then execute that local script file.
---
Nitpick comments:
In `@zsh/aliases.zsh`:
- Around line 88-89: The command substitutions in both the glm and glolsm
functions are already properly quoted with double quotes around
$(get_default_branch), which correctly prevents unexpected word splitting.
Additionally, the $_git_log_pretty variable is also properly quoted. No changes
are needed as the current implementation already follows defensive quoting best
practices.
In `@zsh/functions/autoload/cl`:
- Line 9: In the cl function, replace `builtin cd` with plain `cd` or `z` to
allow the zoxide alias (set in zsh/aliases.zsh line 10) to take effect and
properly track directory visits. The current use of `builtin cd` explicitly
bypasses the alias, preventing zoxide integration for directories accessed
through this autoload function.
In `@zsh/functions/autoload/gmove`:
- Line 11: The current git stash command using $(git diff --staged --name-only)
will fail when staged filenames contain spaces because the expansion produces
space-separated arguments that are incorrectly parsed. Fix this by using a
null-delimited approach with the -z flag on git diff and piping through xargs
with -0 to properly handle filenames with spaces, or alternatively build an
array of filenames using the array syntax and pass the array to git stash to
preserve spaces in individual filenames. Either approach will safely handle the
file list passed to the git stash command.
In `@zsh/functions/autoload/kebabify`:
- Around line 15-16: The kebabify function currently applies the kebab-case
transformation to the entire filename path, which causes the mv command to fail
when the directory structure doesn't exist as specified. Extract the directory
and basename separately using dirname and basename functions before applying the
sed and tr transformations only to the basename portion. After transforming only
the basename, reconstruct the full path by prepending the original directory,
then use this properly constructed path in the mv command to ensure the file is
moved to the correct location within its original directory structure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ed06ec67-7328-4479-b7af-c5e888c7c64d
📒 Files selected for processing (25)
.gitmodulesBrewfileREADME.mddotbotinstallinstall.conf.yamllinks.confp10k.zshsetup_node.zshsetup_zsh.zshzsh/aliases.zshzsh/functions/autoload/clzsh/functions/autoload/get_package_managerzsh/functions/autoload/gmovezsh/functions/autoload/is_script_in_deno_jsonzsh/functions/autoload/is_script_in_package_jsonzsh/functions/autoload/kebabifyzsh/functions/autoload/killportzsh/functions/autoload/list_deno_taskszsh/functions/autoload/list_scripts_in_package_jsonzsh/functions/autoload/mkcdzsh/functions/autoload/runzshenvzshrczshrc.bak
💤 Files with no reviewable changes (5)
- .gitmodules
- install.conf.yaml
- setup_node.zsh
- dotbot
- p10k.zsh
There was a problem hiding this comment.
🧹 Nitpick comments (1)
zsh/functions/autoload/gmove (1)
12-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRedundant deleted-file handling after
git add -A.
git add -Aalready stages deletions, so by the time line 13 runs,git ls-files --deleted(files tracked in the index but missing from the working tree) returns empty, the[[ -z … ]]test is true, andgit rmnever executes. The brace group is effectively a no-op and can be dropped.As a side note, were this block ever reachable,
git rm $(git ls-files --deleted)would also misbehave in zsh, where command substitution isn't word-split by default—multiple deleted files would be passed as a single argument.♻️ Proposed simplification
git stash -- $(git diff --staged --name-only) && git add -A && - { [[ -z "$(git ls-files --deleted)" ]] || git rm $(git ls-files --deleted) 2>/dev/null } && git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]" &&🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@zsh/functions/autoload/gmove` around lines 12 - 14, The deleted-file cleanup in gmove is redundant because `git add -A` already stages removals, so the `git ls-files --deleted`/`git rm` brace group never does anything. Remove that no-op block from the `gmove` command and keep the flow from `git add -A` directly to `git commit`, using the existing `git commit` step as the reference point for where the simplification should occur.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@zsh/functions/autoload/gmove`:
- Around line 12-14: The deleted-file cleanup in gmove is redundant because `git
add -A` already stages removals, so the `git ls-files --deleted`/`git rm` brace
group never does anything. Remove that no-op block from the `gmove` command and
keep the flow from `git add -A` directly to `git commit`, using the existing
`git commit` step as the reference point for where the simplification should
occur.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d026ee30-b53f-4772-bca6-46f18f78adfa
📒 Files selected for processing (7)
setup_zsh.zshzsh/aliases.zshzsh/functions/autoload/gmovezsh/functions/autoload/is_script_in_package_jsonzsh/functions/autoload/runzshenvzshrc
💤 Files with no reviewable changes (1)
- zshenv
🚧 Files skipped from review as they are similar to previous changes (5)
- zsh/functions/autoload/is_script_in_package_json
- setup_zsh.zsh
- zsh/aliases.zsh
- zsh/functions/autoload/run
- zshrc
- Implemented `cl` to change directory and list contents. - Added `get_package_manager` to detect the package manager in use. - Add `gmove` to move staged changes to a new branch. - Introduced `is_script_in_deno_json` to check for scripts in deno.json. - Added `is_script_in_package_json` to verify scripts in package.json. - Implemented `kebabify` to rename files to kebab-case. - Created `killport` to terminate processes listening on a specified port. - Developed `list_deno_tasks` to list available Deno tasks. - Added `list_scripts_in_package_json` to list available npm scripts. - Implemented `mkcd` to create a directory and change into it. - Developed `run` to execute npm/yarn/pnpm/deno scripts with automatic detection. - Refactored zshrc to autoload new functions for faster startup.
…anagement, and zsh configuration
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
… aliases, and updated script handling
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
Brewfile (1)
292-293: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the duplicate
typescriptteam.native-previewentry.
Keeping the Brewfile de-duplicated avoids unnecessary noise in the config.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Brewfile` around lines 292 - 293, The Brewfile contains a duplicate vscode entry for typescriptteam.native-preview, so remove the repeated line and keep only one instance of that package entry. Make the change in the Brewfile section that lists vscode packages, ensuring the config remains de-duplicated and unchanged otherwise.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Brewfile`:
- Around line 1-5: The Brewfile entry for xykong’s cask needs an explicit trust
declaration to avoid unattended bundle installs being blocked on trust-enforced
machines. Update the existing cask entry for flux-markdown to include trusted:
true, and keep the change localized to the Brewfile item identified by
xykong/tap/flux-markdown.
---
Nitpick comments:
In `@Brewfile`:
- Around line 292-293: The Brewfile contains a duplicate vscode entry for
typescriptteam.native-preview, so remove the repeated line and keep only one
instance of that package entry. Make the change in the Brewfile section that
lists vscode packages, ensuring the config remains de-duplicated and unchanged
otherwise.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b0e6b36a-d535-4ae8-a059-8a4b0f90ca22
📒 Files selected for processing (25)
.gitmodulesBrewfileREADME.mddotbotinstallinstall.conf.yamllinks.confp10k.zshsetup_node.zshsetup_zsh.zshzsh/aliases.zshzsh/functions/autoload/clzsh/functions/autoload/get_package_managerzsh/functions/autoload/gmovezsh/functions/autoload/is_script_in_deno_jsonzsh/functions/autoload/is_script_in_package_jsonzsh/functions/autoload/kebabifyzsh/functions/autoload/killportzsh/functions/autoload/list_deno_taskszsh/functions/autoload/list_scripts_in_package_jsonzsh/functions/autoload/mkcdzsh/functions/autoload/runzshenvzshrczshrc.bak
💤 Files with no reviewable changes (5)
- .gitmodules
- dotbot
- install.conf.yaml
- setup_node.zsh
- p10k.zsh
✅ Files skipped from review due to trivial changes (4)
- zsh/functions/autoload/is_script_in_deno_json
- zsh/functions/autoload/get_package_manager
- links.conf
- README.md
🚧 Files skipped from review as they are similar to previous changes (15)
- zsh/functions/autoload/killport
- zsh/functions/autoload/is_script_in_package_json
- zsh/functions/autoload/kebabify
- zsh/functions/autoload/mkcd
- zsh/functions/autoload/cl
- zsh/functions/autoload/list_deno_tasks
- zsh/functions/autoload/list_scripts_in_package_json
- setup_zsh.zsh
- zsh/functions/autoload/gmove
- zsh/aliases.zsh
- zsh/functions/autoload/run
- install
- zshrc
- zshrc.bak
- zshenv
| tap "anomalyco/tap" | ||
| tap "can1357/tap" | ||
| tap "libsql/sqld" | ||
| tap "oven-sh/bun" | ||
| tap "xykong/tap" |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== Brewfile locations ==\n'
git ls-files Brewfile setup_homebrew.zsh
printf '\n== Brewfile around reported lines ==\n'
sed -n '1,220p' Brewfile | cat -n
printf '\n== setup_homebrew.zsh ==\n'
sed -n '1,120p' setup_homebrew.zsh | cat -n
printf '\n== Search for trusted/duplicate related entries ==\n'
rg -n 'trusted:\s*true|xykong/tap/flux-markdown|typescriptteam\.native-preview|can1357/tap/omp|brew bundle' Brewfile setup_homebrew.zshRepository: edouardmisset/dotfiles
Length of output: 9269
🌐 Web query:
Homebrew Bundle trusted true cask tap docs duplicate entries Brewfile behavior
💡 Result:
In Homebrew Bundle, Brewfile entries are evaluated as Ruby, and the behavior regarding duplicate entries and the trusted: true option is as follows: Duplicate Entries: Brewfile entries are generally processed in the order they appear [1][2]. While Homebrew Bundle does not have a strict "deduplication" policy that prevents multiple entries from existing in the file, it typically handles them by attempting to install or reference the specified formulae/casks sequentially. In practice, if you have duplicate brew "name" or cask "name" entries, Homebrew will simply attempt to ensure the package is in the desired state multiple times [3][1]. Because Brewfiles are evaluated as Ruby, you can use standard Ruby logic (e.g., conditional statements or arrays) to prevent or manage duplicates dynamically if desired [1][2]. Trusted: true Option: The trusted: true option allows you to declaratively trust a non-official tap, formula, or cask within your Brewfile [1][4]. This is intended to satisfy Homebrew’s tap trust requirements without needing to run the brew trust command manually [4]. Key behaviors of trusted: true include: 1. Declarative Trust: When trusted: true is set for a tap, brew, or cask entry, Homebrew registers that item as trusted before performing installation or conflict checks [1][5]. This ensures the installation process does not fail due to untrusted tap warnings [5][6]. 2. Dump and Cleanup: When you run brew bundle dump, Homebrew automatically writes trusted: true for any entries that are already trusted on your system [1]. When you run brew bundle cleanup --force, Homebrew resets its internal trust store to match the declarations in your Brewfile, removing any trust entries not explicitly defined there [1][6]. 3. Granularity: Official documentation recommends preferring item-level trust (e.g., specific brew or cask entries) over whole-tap trust whenever possible [1][4]. If you trust only a specific item, Homebrew may load that item without requiring you to trust the entire repository [4]. For complex setups, Homebrew may also generate tap-level trusted: { ... } hashes in your Brewfile to manage partial trust for specific items from a tap [6].
Citations:
- 1: https://docs.brew.sh/Brew-Bundle-and-Brewfile
- 2: https://github.com/Homebrew/brew/blob/main/docs/Brew-Bundle-and-Brewfile.md
- 3: https://lucasgelfond-zerobrew.mintlify.app/guides/brewfile-management
- 4: https://docs.brew.sh/Tap-Trust
- 5: Make
brew bundlehonour thetrusted:option Homebrew/brew#22594 - 6: Support tap trust in Brewfiles Homebrew/brew#22772
🌐 Web query:
site:docs.brew.sh Brewfile trusted true cask Homebrew Bundle duplicate entries
💡 Result:
In a Homebrew Brewfile, the trusted: true option is used to declaratively trust a non-official tap, formula, or cask, allowing Homebrew to load or install them even when tap trust is required [1]. Regarding the handling of duplicate entries in a Brewfile: 1. Behavior: Homebrew Bundle processes entries in the order they appear in the Brewfile. If you list the same formula or cask multiple times, Homebrew generally attempts to process them sequentially [2]. 2. trusted: true application: When using trusted: true, Homebrew Bundle applies the trust status to the specified entry [1]. If multiple lines for the same cask exist, each line is treated as an individual entry by the Homebrew::Bundle::Dsl [3]. It is recommended to keep your Brewfile clean and avoid duplicate declarations to ensure consistent behavior and predictable results during installation and brew bundle cleanup [1]. 3. brew bundle dump: When you run brew bundle dump, Homebrew automatically writes trusted: true for any cask or formula that is currently trusted in your local Homebrew configuration [1][4]. It does not inherently clean up or merge duplicate manual entries; it simply reflects the current state of your installed packages and their trust status [1]. If you find duplicate entries in your Brewfile, it is best practice to consolidate them into a single line, such as cask "example", trusted: true, to avoid potential configuration conflicts [1].
Citations:
- 1: https://docs.brew.sh/Brew-Bundle-and-Brewfile
- 2: https://docs.brew.sh/rubydoc/Homebrew/Bundle/Installer.html
- 3: https://docs.brew.sh/rubydoc/Homebrew/Bundle/Dsl.html
- 4: https://docs.brew.sh/rubydoc/Homebrew/Bundle/Cask.html
Add trusted: true to cask "xykong/tap/flux-markdown" in Brewfile. Non-official taps/casks can block unattended brew bundle installs on machines that enforce tap trust, and this entry is currently the only one without an explicit trust declaration.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Brewfile` around lines 1 - 5, The Brewfile entry for xykong’s cask needs an
explicit trust declaration to avoid unattended bundle installs being blocked on
trust-enforced machines. Update the existing cask entry for flux-markdown to
include trusted: true, and keep the change localized to the Brewfile item
identified by xykong/tap/flux-markdown.
Summary by CodeRabbit
zshdynamically, updating/etc/shells, and switching the login shell when needed.p10kconfiguration, stopped installing global NPM packages, and removed prior dotbot/installer configuration.