Skip to content

Commit

Permalink
zsh_compinit_fix: Get completions_dir from brew
Browse files Browse the repository at this point in the history
- Use brew --prefix instead of hard coding the directory
- No check to see if brew is installed before executing it
  • Loading branch information
0xmachos committed Apr 24, 2024
1 parent ccbdf3a commit 154c1c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bittersweet
Original file line number Diff line number Diff line change
Expand Up @@ -946,13 +946,13 @@ function install_brewfile {

function zsh_compinit_fix {
# zsh_compinit_fix
# Secure permissions on zsh completion
# files at /usr/local/share
# Secure permissions on zsh completion files at /opt/homebrew/share
# https://stackoverflow.com/a/43544733
# https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh
# Remove group/other write/execite permissions
# Change ownership to $USER:staff

local -r completions_dir="/usr/local/share"
local -r completions_dir="$(brew --prefix)/share"

echo "[🍺] Fixing zsh completions permissions"

Expand Down

0 comments on commit 154c1c9

Please sign in to comment.