zsh:diffcmds(): Add pipes TODO and format
This commit is contained in:
@@ -672,6 +672,7 @@ diffcmds() {
|
|||||||
|
|
||||||
# Just execute the command without *diff if there is only one argument
|
# Just execute the command without *diff if there is only one argument
|
||||||
if (( i + 1 == # )); then
|
if (( i + 1 == # )); then
|
||||||
|
# TODO: Implement better way to make pipes possible
|
||||||
eval "${(@)${(q@)${@:1:$((i-1))}//\%\%/${@[$#]}}/#%\\|/|}"
|
eval "${(@)${(q@)${@:1:$((i-1))}//\%\%/${@[$#]}}/#%\\|/|}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@@ -695,7 +696,12 @@ diffcmds() {
|
|||||||
# of quotation but unquoting single pipes again.
|
# of quotation but unquoting single pipes again.
|
||||||
cmdline=("$cmd")
|
cmdline=("$cmd")
|
||||||
for arg in "${@:$((i+1))}"; do
|
for arg in "${@:$((i+1))}"; do
|
||||||
cmdline+=("$ps_sub" "${(@)${(q@)${@:1:$((i-1))}//\%\%/$arg}/#%\\|/|}" ")")
|
# TODO: Implement better way to make pipes possible
|
||||||
|
cmdline+=(
|
||||||
|
"$ps_sub"
|
||||||
|
"${(@)${(q@)${@:1:$((i-1))}//\%\%/$arg}/#%\\|/|}"
|
||||||
|
")"
|
||||||
|
)
|
||||||
done
|
done
|
||||||
eval "$cmdline[@]"
|
eval "$cmdline[@]"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user