Merge remote-tracking branch 'jeroendehaas/iterm-fix-spaces'
This commit is contained in:
commit
5fb858d0c5
|
@ -22,11 +22,18 @@ define-command -hidden -params 2.. iterm-terminal-split-impl %{
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
|
||||||
# go through another round of escaping for osascript
|
# go through another round of escaping for osascript
|
||||||
# \ -> \\
|
# \ -> \\
|
||||||
# " -> \"
|
# " -> \"
|
||||||
escaped=$(printf %s "$args" | sed -e 's|\\|\\\\|g; s|"|\\"|g')
|
do_esc() {
|
||||||
cmd="env PATH='${PATH}' TMPDIR='${TMPDIR}' $escaped"
|
printf %s "$*" | sed -e 's|\\|\\\\|g; s|"|\\"|g'
|
||||||
|
}
|
||||||
|
|
||||||
|
escaped=$(do_esc "$args")
|
||||||
|
esc_path=$(do_esc "$PATH")
|
||||||
|
esc_tmp=$(do_esc "$TMPDIR")
|
||||||
|
cmd="env PATH='${esc_path}' TMPDIR='${esc_tmp}' $escaped"
|
||||||
osascript \
|
osascript \
|
||||||
-e "tell application \"iTerm\"" \
|
-e "tell application \"iTerm\"" \
|
||||||
-e " tell current session of current window" \
|
-e " tell current session of current window" \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user