[zshrc] Fix error when /usr/local/share doesn't exist
This commit is contained in:
parent
6c565363e9
commit
b1a5191883
1 changed files with 1 additions and 2 deletions
3
zshrc
3
zshrc
|
|
@ -303,8 +303,7 @@ autoload -Uz compinit
|
|||
# that group writable files in /usr/local are deemed insecure. But I'm the only
|
||||
# actual user so tell compinit not to bother me about compaudit's complaints.
|
||||
is_group_writable() {
|
||||
local ls=$(ls -ld "$1")
|
||||
[[ "${ls:5:1}" = "w" ]]
|
||||
[[ -d "$1" ]] && [[ "${$(ls -ld "$1"):5:1}" = "w" ]]
|
||||
}
|
||||
if mac && is_group_writable /usr/local/share; then
|
||||
compinit -u
|
||||
|
|
|
|||
Loading…
Reference in a new issue