rc iterm: POSIX fixes
This commit is contained in:
parent
43b72770ec
commit
513eb2720e
|
@ -5,7 +5,7 @@
|
||||||
## an iTerm session if not in a tmux session.
|
## an iTerm session if not in a tmux session.
|
||||||
hook global KakBegin .* %{
|
hook global KakBegin .* %{
|
||||||
%sh{
|
%sh{
|
||||||
if [ "$TERM_PROGRAM" = "iTerm.app" -a -z "$TMUX" ]; then
|
if [ "$TERM_PROGRAM" = "iTerm.app" ] && [ -z "$TMUX" ]; then
|
||||||
echo "
|
echo "
|
||||||
alias global new iterm-new-vertical
|
alias global new iterm-new-vertical
|
||||||
alias global focus iterm-focus
|
alias global focus iterm-focus
|
||||||
|
@ -18,8 +18,8 @@ define-command -hidden -params 1.. iterm-new-split-impl %{
|
||||||
%sh{
|
%sh{
|
||||||
direction="$1"
|
direction="$1"
|
||||||
shift
|
shift
|
||||||
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$@\\\""; fi
|
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$*\\\""; fi
|
||||||
cmd="env -P ${PATH} TMPDIR=${TMPDIR} kak -c ${kak_session} ${kakoune_params}"
|
cmd="env PATH='${PATH}' TMPDIR='${TMPDIR}' kak -c '${kak_session}' ${kakoune_params}"
|
||||||
osascript \
|
osascript \
|
||||||
-e "tell application \"iTerm\"" \
|
-e "tell application \"iTerm\"" \
|
||||||
-e " tell current session of current window" \
|
-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} \
|
All optional arguments are forwarded to the new kak client} \
|
||||||
iterm-new-tab %{
|
iterm-new-tab %{
|
||||||
%sh{
|
%sh{
|
||||||
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$@\\\""; fi
|
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$*\\\""; fi
|
||||||
cmd="env -P ${PATH} TMPDIR=${TMPDIR} kak -c ${kak_session} ${kakoune_params}"
|
cmd="env PATH='${PATH}' TMPDIR='${TMPDIR}' kak -c '${kak_session}' ${kakoune_params}"
|
||||||
osascript \
|
osascript \
|
||||||
-e "tell application \"iTerm\"" \
|
-e "tell application \"iTerm\"" \
|
||||||
-e " tell current window" \
|
-e " tell current window" \
|
||||||
|
@ -58,8 +58,8 @@ define-command -params .. -command-completion \
|
||||||
All optional arguments are forwarded to the new kak client} \
|
All optional arguments are forwarded to the new kak client} \
|
||||||
iterm-new-window %{
|
iterm-new-window %{
|
||||||
%sh{
|
%sh{
|
||||||
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$@\\\""; fi
|
if [ $# -gt 0 ]; then kakoune_params="-e \\\"$*\\\""; fi
|
||||||
cmd="env -P ${PATH} TMPDIR=${TMPDIR} kak -c ${kak_session} ${kakoune_params}"
|
cmd="env PATH='${PATH}' TMPDIR='${TMPDIR}' kak -c '${kak_session}' ${kakoune_params}"
|
||||||
osascript \
|
osascript \
|
||||||
-e "tell application \"iTerm\"" \
|
-e "tell application \"iTerm\"" \
|
||||||
-e " create window with default profile command \"${cmd}\"" \
|
-e " create window with default profile command \"${cmd}\"" \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user