1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-29 01:24:52 +03:00

rc iterm: POSIX fixes

This commit is contained in:
Frank LENORMAND 2018-06-30 14:07:20 +03:00
parent 43b72770ec
commit 513eb2720e

View File

@ -5,7 +5,7 @@
## an iTerm session if not in a tmux session.
hook global KakBegin .* %{
%sh{
if [ "$TERM_PROGRAM" = "iTerm.app" -a -z "$TMUX" ]; then
if [ "$TERM_PROGRAM" = "iTerm.app" ] && [ -z "$TMUX" ]; then
echo "
alias global new iterm-new-vertical
alias global focus iterm-focus
@ -18,8 +18,8 @@ define-command -hidden -params 1.. iterm-new-split-impl %{
%sh{
direction="$1"
shift
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$@\\\""; fi
cmd="env -P ${PATH} TMPDIR=${TMPDIR} kak -c ${kak_session} ${kakoune_params}"
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$*\\\""; fi
cmd="env PATH='${PATH}' TMPDIR='${TMPDIR}' kak -c '${kak_session}' ${kakoune_params}"
osascript \
-e "tell application \"iTerm\"" \
-e " tell current session of current window" \
@ -42,8 +42,8 @@ define-command -params .. -command-completion \
All optional arguments are forwarded to the new kak client} \
iterm-new-tab %{
%sh{
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$@\\\""; fi
cmd="env -P ${PATH} TMPDIR=${TMPDIR} kak -c ${kak_session} ${kakoune_params}"
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$*\\\""; fi
cmd="env PATH='${PATH}' TMPDIR='${TMPDIR}' kak -c '${kak_session}' ${kakoune_params}"
osascript \
-e "tell application \"iTerm\"" \
-e " tell current window" \
@ -58,8 +58,8 @@ define-command -params .. -command-completion \
All optional arguments are forwarded to the new kak client} \
iterm-new-window %{
%sh{
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$@\\\""; fi
cmd="env -P ${PATH} TMPDIR=${TMPDIR} kak -c ${kak_session} ${kakoune_params}"
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$*\\\""; fi
cmd="env PATH='${PATH}' TMPDIR='${TMPDIR}' kak -c '${kak_session}' ${kakoune_params}"
osascript \
-e "tell application \"iTerm\"" \
-e " create window with default profile command \"${cmd}\"" \