- Fix: proper escaping of kak_{session, client}
This commit is contained in:
parent
494d046fb2
commit
e5742fd6b1
|
@ -14,14 +14,14 @@ define-command \
|
|||
-docstring %{ranger [<arguments>]: open the file system explorer to select buffers to open
|
||||
All the optional arguments are forwarded to the ranger utility} \
|
||||
ranger %{ %sh{
|
||||
if [ -n "$TMUX" ]; then
|
||||
if [ -n "${TMUX}" ]; then
|
||||
tmux split-window -h \
|
||||
ranger $@ --cmd " \
|
||||
map <return> eval \
|
||||
fm.execute_console('shell \
|
||||
echo evaluate-commands -client $kak_client edit {file} | \
|
||||
kak -p $kak_session; \
|
||||
tmux select-pane -t $kak_client_env_TMUX_PANE'.format(file=fm.thisfile.path)) \
|
||||
echo evaluate-commands -client ' + ranger.ext.shell_escape.shell_escape('$kak_client') + ' edit {file} | \
|
||||
kak -p '.format(file=fm.thisfile.path) + ranger.ext.shell_escape.shell_escape('$kak_session') + '; \
|
||||
tmux select-pane -t $kak_client_env_TMUX_PANE') \
|
||||
if fm.thisfile.is_file else fm.execute_console('move right=1')"
|
||||
|
||||
elif [ -n "${STY}" ]; then
|
||||
|
@ -51,9 +51,9 @@ EOF
|
|||
ranger $@ --cmd "'"'" \
|
||||
map <return> eval \
|
||||
fm.execute_console('shell \
|
||||
echo evaluate-commands -client $kak_client edit {file} | \
|
||||
kak -p $kak_session; \
|
||||
xdotool windowactivate $kak_client_env_WINDOWID'.format(file=fm.thisfile.path)) \
|
||||
echo evaluate-commands -client ' + ranger.ext.shell_escape.shell_escape('$kak_client') + ' edit {file} | \
|
||||
kak -p '.format(file=fm.thisfile.path) + ranger.ext.shell_escape.shell_escape('$kak_session') + '; \
|
||||
xdotool windowactivate $kak_client_env_WINDOWID') \
|
||||
if fm.thisfile.is_file else fm.execute_console('move right=1')"'"' < /dev/null > /dev/null 2>&1 &
|
||||
fi
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user