Escape $ before sending commands to tmux. Fixes #39

1.0.0rc1
benmills 12 years ago
parent c5216bb345
commit 908358a09a

@ -315,10 +315,14 @@ class TmuxSession
end
def _send_command(command, target, auto_return = true)
_run("send-keys -t #{target} \"#{command.gsub('"', '\"')}\"")
_run("send-keys -t #{target} \"#{_escape_command(command)}\"")
_run("send-keys -t #{target} Enter") if auto_return
end
def _escape_command(command)
command.gsub('"', '\"').gsub('$', '\$')
end
def _run(command)
`tmux #{command}`
end

Loading…
Cancel
Save