From 81f9d9260c17ce7c54acf11f2da0c2e7adc8e166 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Thu, 16 Aug 2012 01:42:56 +1200 Subject: [PATCH] Handle wrapper for shell builtins --- lib/git/aliases_and_bindings.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/git/aliases_and_bindings.sh b/lib/git/aliases_and_bindings.sh index 93355df..db6d479 100644 --- a/lib/git/aliases_and_bindings.sh +++ b/lib/git/aliases_and_bindings.sh @@ -208,8 +208,12 @@ if [ "$shell_command_wrapping_enabled" = "true" ] || [ "$bash_command_wrapping_e unset -f $cmd # Create wrapped alias for old function alias "$cmd"="exec_scmb_expand_args __original_$cmd";; - - *) # Otherwise, command is a regular script or binary that can be aliased + *'is a shell builtin'*) + # Handle shell builtin commands + alias $cmd="exec_scmb_expand_args builtin $cmd";; + *) + # Otherwise, command is a regular script or binary, + # and the full path can be found from 'which' alias $cmd="exec_scmb_expand_args $(\which $cmd)";; esac done