Merge remote-tracking branch 'lenormf/fix-multiplexers-docstring'

This commit is contained in:
Maxime Coste 2018-07-01 11:17:54 +10:00
commit 24ab99c8bf
3 changed files with 13 additions and 13 deletions

View File

@ -12,7 +12,7 @@ hook -group GNUscreen global KakBegin .* %{
} }
define-command screen-new-vertical -params .. -command-completion -docstring "Create a new vertical region" %{ define-command screen-new-vertical -params .. -command-completion -docstring "Split the current pane into two, left and right" %{
%sh{ %sh{
tty="$(ps -o tty ${kak_client_pid} | tail -n 1)" tty="$(ps -o tty ${kak_client_pid} | tail -n 1)"
screen -X eval \ screen -X eval \
@ -24,7 +24,7 @@ define-command screen-new-vertical -params .. -command-completion -docstring "Cr
} }
} }
define-command screen-new-horizontal -params .. -command-completion -docstring "Create a new horizontal region" %{ define-command screen-new-horizontal -params .. -command-completion -docstring "Split the current pane into two, top and bottom" %{
%sh{ %sh{
tty="$(ps -o tty ${kak_client_pid} | tail -n 1)" tty="$(ps -o tty ${kak_client_pid} | tail -n 1)"
screen -X eval \ screen -X eval \

View File

@ -28,11 +28,11 @@ define-command -hidden -params 1.. tmux-new-impl %{
} }
} }
define-command tmux-new-vertical -params .. -command-completion -docstring "Create a new vertical pane" %{ define-command tmux-new-vertical -params .. -command-completion -docstring "Split the current pane into two, top and bottom" %{
tmux-new-impl 'split-window -v' %arg{@} tmux-new-impl 'split-window -v' %arg{@}
} }
define-command tmux-new-horizontal -params .. -command-completion -docstring "Create a new horizontal pane" %{ define-command tmux-new-horizontal -params .. -command-completion -docstring "Split the current pane into two, left and right" %{
tmux-new-impl 'split-window -h' %arg{@} tmux-new-impl 'split-window -h' %arg{@}
} }

View File

@ -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" \
@ -29,11 +29,11 @@ define-command -hidden -params 1.. iterm-new-split-impl %{
} }
} }
define-command iterm-new-vertical -params .. -command-completion -docstring "Create a new vertical pane" %{ define-command iterm-new-vertical -params .. -command-completion -docstring "Split the current pane into two, top and bottom" %{
iterm-new-split-impl 'vertically' %arg{@} iterm-new-split-impl 'vertically' %arg{@}
} }
define-command iterm-new-horizontal -params .. -command-completion -docstring "Create a new horizontal pane" %{ define-command iterm-new-horizontal -params .. -command-completion -docstring "Split the current pane into two, left and right" %{
iterm-new-split-impl 'horizontally' %arg{@} iterm-new-split-impl 'horizontally' %arg{@}
} }
@ -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}\"" \