File tree Expand file tree Collapse file tree 5 files changed +25
-5
lines changed Expand file tree Collapse file tree 5 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## v0.6.1
4
+ - Fixed bug occurring when ` _complete ` had been aliased (#443 )
5
+
3
6
## v0.6.0
4
7
- Added ` completion ` suggestion strategy powered by completion system (#111 )
5
8
- Allow setting ` ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE ` to an empty string (#422 )
Original file line number Diff line number Diff line change 1
- v0.6.0
1
+ v0.6.1
Original file line number Diff line number Diff line change 20
20
wait_for { session . content } . to eq ( "baz \\ \n bar" )
21
21
end
22
22
23
+ context 'when `_complete` is aliased' do
24
+ let ( :before_sourcing ) do
25
+ -> do
26
+ session .
27
+ run_command ( 'autoload compinit && compinit' ) .
28
+ run_command ( '_foo() { compadd bar; compadd bat }' ) .
29
+ run_command ( 'compdef _foo baz' ) .
30
+ run_command ( 'alias _complete=_complete' )
31
+ end
32
+ end
33
+
34
+ it 'suggests the first completion result' do
35
+ session . send_string ( 'baz ' )
36
+ wait_for { session . content } . to eq ( 'baz bar' )
37
+ end
38
+ end
39
+
23
40
context 'when async mode is enabled' do
24
41
let ( :options ) { [ 'ZSH_AUTOSUGGEST_USE_ASYNC=true' , 'ZSH_AUTOSUGGEST_STRATEGY=completion' ] }
25
42
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ _zsh_autosuggest_capture_completion_async() {
86
86
# https://stackoverflow.com/a/7057118/154703
87
87
autoload +X _complete
88
88
functions[_original_complete]=$functions [_complete]
89
- _complete () {
89
+ function _complete () {
90
90
unset ' compstate[vared]'
91
91
_original_complete " $@ "
92
92
}
Original file line number Diff line number Diff line change 1
1
# Fish-like fast/unobtrusive autosuggestions for zsh.
2
2
# https://github.com/zsh-users/zsh-autosuggestions
3
- # v0.6.0
3
+ # v0.6.1
4
4
# Copyright (c) 2013 Thiago de Arruda
5
- # Copyright (c) 2016-2018 Eric Freese
5
+ # Copyright (c) 2016-2019 Eric Freese
6
6
#
7
7
# Permission is hereby granted, free of charge, to any person
8
8
# obtaining a copy of this software and associated documentation
@@ -568,7 +568,7 @@ _zsh_autosuggest_capture_completion_async() {
568
568
# https://stackoverflow.com/a/7057118/154703
569
569
autoload +X _complete
570
570
functions[_original_complete]=$functions [_complete]
571
- _complete () {
571
+ function _complete () {
572
572
unset ' compstate[vared]'
573
573
_original_complete " $@ "
574
574
}
You can’t perform that action at this time.
0 commit comments