mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
Handle dashes at the beginning of commands
This commit is contained in:
parent
48a21bf79e
commit
c9a51e0c4c
4 changed files with 8 additions and 3 deletions
|
|
@ -51,5 +51,10 @@ describe 'a special character in the buffer' do
|
|||
session.send_string('echo "^A')
|
||||
wait_for { session.content }.to eq('echo "^A"')
|
||||
end
|
||||
|
||||
with_history('-foo() {}') do
|
||||
session.send_string('-')
|
||||
wait_for { session.content }.to eq('-foo() {}')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class TerminalSession
|
|||
end
|
||||
|
||||
def send_string(str)
|
||||
tmux_command("send-keys -t 0 -l '#{str.gsub("'", "\\'")}'")
|
||||
tmux_command("send-keys -t 0 -l -- '#{str.gsub("'", "\\'")}'")
|
||||
|
||||
self
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue