diff --git a/build/build.plugin.zsh b/build/build.plugin.zsh index 688d0b6..21b0bb0 100644 --- a/build/build.plugin.zsh +++ b/build/build.plugin.zsh @@ -165,11 +165,18 @@ EOF # Build then run a target residing in `~build/bin`. build-run() { local target=$1; shift 1 - eval build $target && ~build/bin/$target $* + eval build $target && ~build/bin/$target "$@" } # Build then debug a target residing in `~build/bin`. build-debug() { local target=$1; shift 1 - eval build $target && debug ~build/bin/$target $* + # For each item in $* replace * and \* and then replace \ with \\ + autoload -U regexp-replace + local args=() + for arg in "$@"; do + regexp-replace arg '\*' '\\*' + args+=($arg) + done + eval build $target && debug ~build/bin/$target $args }