|
|
@ -20,6 +20,23 @@ describe 'the `completion` suggestion strategy' do |
|
|
|
wait_for { session.content }.to eq("baz \\\nbar") |
|
|
|
end |
|
|
|
|
|
|
|
context 'when `_complete` is aliased' do |
|
|
|
let(:before_sourcing) do |
|
|
|
-> do |
|
|
|
session. |
|
|
|
run_command('autoload compinit && compinit'). |
|
|
|
run_command('_foo() { compadd bar; compadd bat }'). |
|
|
|
run_command('compdef _foo baz'). |
|
|
|
run_command('alias _complete=_complete') |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
it 'suggests the first completion result' do |
|
|
|
session.send_string('baz ') |
|
|
|
wait_for { session.content }.to eq('baz bar') |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
context 'when async mode is enabled' do |
|
|
|
let(:options) { ['ZSH_AUTOSUGGEST_USE_ASYNC=true', 'ZSH_AUTOSUGGEST_STRATEGY=completion'] } |
|
|
|
|
|
|
|