-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #440 from zsh-users/develop
v0.6.0
- Loading branch information
Showing
20 changed files
with
428 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v0.5.2 | ||
v0.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
describe 'a running zpty command' do | ||
let(:before_sourcing) { -> { session.run_command('zmodload zsh/zpty && zpty -b kitty cat') } } | ||
|
||
context 'when using `completion` strategy' do | ||
let(:options) { ["ZSH_AUTOSUGGEST_STRATEGY=completion"] } | ||
|
||
it 'is not affected' do | ||
session.send_keys('a').send_keys('C-h') | ||
session.run_command('zpty -t kitty; echo $?') | ||
|
||
wait_for { session.content }.to end_with("\n0") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
context 'with zle-line-init unignored' do | ||
let(:after_sourcing) do | ||
-> do | ||
session. | ||
run_command('setopt extendedglob'). | ||
run_command('ZSH_AUTOSUGGEST_IGNORE_WIDGETS=(${(@)ZSH_AUTOSUGGEST_IGNORE_WIDGETS:#zle-\*} zle-\^line-init)'). | ||
run_command('zle-line-init() { BUFFER="echo" }') | ||
end | ||
end | ||
|
||
it 'should fetch a suggestion on each line initialization' do | ||
with_history('echo foo') do | ||
session.run_command('zle -N zle-line-init') | ||
wait_for { session.content }.to end_with('echo foo') | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
describe 'the `completion` suggestion strategy' do | ||
let(:options) { ['ZSH_AUTOSUGGEST_STRATEGY=completion'] } | ||
let(:before_sourcing) do | ||
-> do | ||
session. | ||
run_command('autoload compinit && compinit'). | ||
run_command('_foo() { compadd bar; compadd bat }'). | ||
run_command('compdef _foo baz') | ||
end | ||
end | ||
|
||
it 'suggests the first completion result' do | ||
session.send_string('baz ') | ||
wait_for { session.content }.to eq('baz bar') | ||
end | ||
|
||
it 'does not add extra carriage returns when prefix has a line feed' do | ||
skip '`stty` does not work inside zpty below zsh version 5.0.3' if session.zsh_version < Gem::Version.new('5.0.3') | ||
session.send_string('baz \\').send_keys('C-v', 'C-j') | ||
wait_for { session.content }.to eq("baz \\\nbar") | ||
end | ||
|
||
context 'when async mode is enabled' do | ||
let(:options) { ['ZSH_AUTOSUGGEST_USE_ASYNC=true', 'ZSH_AUTOSUGGEST_STRATEGY=completion'] } | ||
|
||
it 'suggests the first completion result' do | ||
session.send_string('baz ') | ||
wait_for { session.content }.to eq('baz bar') | ||
end | ||
|
||
it 'does not add extra carriage returns when prefix has a line feed' do | ||
skip '`stty` does not work inside zpty below zsh version 5.0.3' if session.zsh_version < Gem::Version.new('5.0.3') | ||
session.send_string('baz \\').send_keys('C-v', 'C-j') | ||
wait_for { session.content }.to eq("baz \\\nbar") | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.