comparison .zfun/zsh-autosuggestions/spec/integrations/bracketed_paste_magic_spec.rb @ 467:e1ce8897030d

zsh: import df6f6f9ff41 of zsh-autosuggestions
author Augie Fackler <raf@durin42.com>
date Mon, 03 Dec 2018 22:37:29 -0500
parents
children
comparison
equal deleted inserted replaced
466:f248cf012d9a 467:e1ce8897030d
1 describe 'pasting using bracketed-paste-magic' do
2 let(:before_sourcing) do
3 -> do
4 session.
5 run_command('autoload -Uz bracketed-paste-magic').
6 run_command('zle -N bracketed-paste bracketed-paste-magic')
7 end
8 end
9
10 context 'with suggestions disabled while pasting' do
11 before do
12 session.
13 run_command('bpm_init() { zle autosuggest-disable }').
14 run_command('bpm_finish() { zle autosuggest-enable }').
15 run_command('zstyle :bracketed-paste-magic paste-init bpm_init').
16 run_command('zstyle :bracketed-paste-magic paste-finish bpm_finish')
17 end
18
19 it 'does not show an incorrect suggestion' do
20 with_history('echo hello') do
21 session.paste_string("echo #{'a' * 60}")
22 sleep 1
23 expect(session.content).to eq("echo #{'a' * 60}")
24 end
25 end
26 end
27 end