summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2017-04-10 22:17:59 +0300
committerFrank LENORMAND <lenormf@gmail.com>2017-04-10 22:17:59 +0300
commita244c101671ee5e7e2f34e8068bb70eb58130f17 (patch)
tree6350520cbfe042805a891e522aad34710a1bc0ad
parent79faae854614f56947c78f71d4d502bfd906900e (diff)
rc: Forward $TMPDIR to `iterm` subprocesses
-rw-r--r--rc/extra/iterm.kak30
1 files changed, 15 insertions, 15 deletions
diff --git a/rc/extra/iterm.kak b/rc/extra/iterm.kak
index 436889ab..80ed64a8 100644
--- a/rc/extra/iterm.kak
+++ b/rc/extra/iterm.kak
@@ -20,14 +20,14 @@ def -hidden -params 1.. iterm-new-split-impl %{
shift
if [ $# -gt 0 ]; then kakoune_params="-e '$@'"; fi
sh_cmd="kak -c ${kak_session} ${kakoune_params}"
- osascript \
- -e "tell application \"iTerm\"" \
- -e " tell current session of current window" \
- -e " tell (split ${direction} with same profile)" \
- -e " select" \
- -e " write text \"${sh_cmd}\"" \
- -e " end tell" \
- -e " end tell" \
+ osascript \
+ -e "tell application \"iTerm\"" \
+ -e " tell current session of current window" \
+ -e " tell (split ${direction} with same profile)" \
+ -e " select" \
+ -e " write text \"TMPDIR='${TMPDIR}' ${sh_cmd}\"" \
+ -e " end tell" \
+ -e " end tell" \
-e "end tell"
}
}
@@ -51,7 +51,7 @@ All optional arguments are forwarded to the new kak client} \
-e "tell application \"iTerm\"" \
-e " tell current window" \
-e " tell current session of (create tab with default profile)" \
- -e " write text \"${sh_cmd}\"" \
+ -e " write text \"TMPDIR='${TMPDIR}' ${sh_cmd}\"" \
-e " end tell" \
-e " end tell" \
-e "end tell"
@@ -65,12 +65,12 @@ All optional arguments are forwarded to the new kak client} \
%sh{
if [ $# -gt 0 ]; then kakoune_params="-e '$@'"; fi
sh_cmd="kak -c ${kak_session} ${kakoune_params}"
- osascript \
- -e "tell application \"iTerm\"" \
- -e " set w to (create window with default profile)" \
- -e " tell current session of w" \
- -e " write text \"${sh_cmd}\"" \
- -e " end tell" \
+ osascript \
+ -e "tell application \"iTerm\"" \
+ -e " set w to (create window with default profile)" \
+ -e " tell current session of w" \
+ -e " write text \"TMPDIR='${TMPDIR}' ${sh_cmd}\"" \
+ -e " end tell" \
-e "end tell"
}
}