mirror of
https://github.com/zdharma-continuum/zinit-annex-bin-gem-node.git
synced 2026-09-10 07:26:18 -04:00
Create .cmd on Cygwin
This commit is contained in:
parent
b874656195
commit
892efc3730
|
|
@ -26,11 +26,11 @@ cd ${dir}"}
|
|||
"
|
||||
|
||||
if (( run_type == 0 )); then
|
||||
REPLY+="%bindir%\\${bint}"
|
||||
REPLY+="%bindir%\\${bint} %*"
|
||||
elif (( run_type == 1 )); then
|
||||
REPLY+="zsh -c 'source \"%bindir%\"\\\\\\\\${bint}'"
|
||||
REPLY+="zsh -c 'source \"%bindir%\"\\\\\\\\${bint} %*'"
|
||||
elif (( run_type == 2 )); then
|
||||
REPLY+="zsh -c 'eval \"\$(<\"%bindir%\"\\\\\\\\${bint})\"'"
|
||||
REPLY+="zsh -c '() { eval \"\$(<\"%bindir%\"\\\\\\\\${bint})\" } %*'"
|
||||
fi
|
||||
|
||||
(( use_all_null )) && REPLY+=" 2>NUL >NUL"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
0="${${(M)0:#/*}:-$PWD/$0}"
|
||||
|
||||
autoload .za-bgn-bin-or-src-function-body \
|
||||
.za-bgn-bin-or-src-function-body-cygwin \
|
||||
.za-bgn-mod-function-body \
|
||||
→za-bgn-atload-handler →za-bgn-atclone-handler \
|
||||
→za-bgn-atpull-handler →za-bgn-help-handler \
|
||||
|
|
|
|||
|
|
@ -164,6 +164,17 @@ if (( ${+ZINIT_ICE[sbin]} )) {
|
|||
fnam="${srcdst[2]:-${srcdst[1]:t}}"
|
||||
local file="$ZPFX/bin/$fnam"
|
||||
|
||||
if [[ $OSTYPE == cygwin ]]; then
|
||||
.za-bgn-bin-or-src-function-body-cygwin 0 \
|
||||
"$fnam" \
|
||||
"$target_binary" "$dir" "$set_gem_home" \
|
||||
"$set_node_path" "$set_cwd" "$use_all_null" \
|
||||
"$use_err_null" "$use_out_null"
|
||||
builtin print -r -- "$REPLY" \
|
||||
>! "$file.cmd"
|
||||
command chmod +x "$file.cmd"
|
||||
fi
|
||||
|
||||
.za-bgn-bin-or-src-function-body 0 \
|
||||
"$fnam" \
|
||||
"$target_binary" "$dir" "$set_gem_home" \
|
||||
|
|
|
|||
Loading…
Reference in a new issue