Skip to content

Commit dd1c213

Browse files
committed
updated from benmills remote master
1 parent 201964f commit dd1c213

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugin/vimux.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,14 @@ class TmuxSession
319319
end
320320

321321
def _send_command(command, target, auto_return = true)
322-
_run("send-keys -t #{target} \"#{command.gsub('"', '\"')}\"")
322+
_run("send-keys -t #{target} \"#{_escape_command(command)}\"")
323323
_run("send-keys -t #{target} Enter") if auto_return
324324
end
325325

326+
def _escape_command(command)
327+
command.gsub('"', '\"').gsub('$', '\$')
328+
end
329+
326330
def _run(command)
327331
`tmux #{command}`
328332
end

0 commit comments

Comments
 (0)