1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 12:48:01 +00:00

gnu-utility: avoid overriding shell builtins

Fixes #1263
This commit is contained in:
Kaleb Elwert 2017-11-10 11:54:51 -08:00
parent 948d9b3aa5
commit 105e9658bb

View File

@ -48,7 +48,7 @@ _gnu_utility_cmds=(
# Wrap GNU utilities in functions. # Wrap GNU utilities in functions.
for _gnu_utility_cmd in "${_gnu_utility_cmds[@]}"; do for _gnu_utility_cmd in "${_gnu_utility_cmds[@]}"; do
_gnu_utility_pcmd="${_gnu_utility_p}${_gnu_utility_cmd}" _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 " eval "
function ${_gnu_utility_cmd} { function ${_gnu_utility_cmd} {
'${commands[${_gnu_utility_pcmd}]}' \"\$@\" '${commands[${_gnu_utility_pcmd}]}' \"\$@\"