Handle wrapper for shell builtins
This commit is contained in:
@@ -208,8 +208,12 @@ if [ "$shell_command_wrapping_enabled" = "true" ] || [ "$bash_command_wrapping_e
|
|||||||
unset -f $cmd
|
unset -f $cmd
|
||||||
# Create wrapped alias for old function
|
# Create wrapped alias for old function
|
||||||
alias "$cmd"="exec_scmb_expand_args __original_$cmd";;
|
alias "$cmd"="exec_scmb_expand_args __original_$cmd";;
|
||||||
|
*'is a shell builtin'*)
|
||||||
*) # Otherwise, command is a regular script or binary that can be aliased
|
# 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)";;
|
alias $cmd="exec_scmb_expand_args $(\which $cmd)";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user