Skip to content

Commit

Permalink
gnu-utility: avoid overriding shell builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
belak authored and lalonde committed Feb 28, 2019
1 parent eab3953 commit 85e8db4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/gnu-utility/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ _gnu_utility_cmds=(
# Wrap GNU utilities in functions.
for _gnu_utility_cmd in "${_gnu_utility_cmds[@]}"; do
_gnu_utility_pcmd="${_gnu_utility_p}${_gnu_utility_cmd}"
if (( ${+commands[${_gnu_utility_pcmd}]} )); then
if (( ${+commands[${_gnu_utility_pcmd}]} && ! ${+builtins[${_gnu_utility_cmd}]} )); then
eval "
function ${_gnu_utility_cmd} {
'${commands[${_gnu_utility_pcmd}]}' \"\$@\"
Expand Down

0 comments on commit 85e8db4

Please sign in to comment.