mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-12-23 10:21:15 +01:00
Fixed server log statements
This commit is contained in:
parent
09954ddd71
commit
3dbe2c8c9b
1 changed files with 3 additions and 4 deletions
|
@ -14,13 +14,13 @@ read-to-null() {
|
|||
accept-connection() {
|
||||
zsocket -a $server
|
||||
fds[$REPLY]=1
|
||||
print "connection accepted, fd: $REPLY" >&2
|
||||
print "connection accepted, fd: $REPLY"
|
||||
}
|
||||
|
||||
handle-request() {
|
||||
local connection=$1 current line
|
||||
integer read_something=0
|
||||
print "request received from fd $connection" >&2
|
||||
print "request received from fd $connection"
|
||||
while read -u $connection prefix &> /dev/null; do
|
||||
read_something=1
|
||||
# send the prefix to be completed followed by a TAB to force
|
||||
|
@ -44,7 +44,7 @@ handle-request() {
|
|||
break # handle more requests/return to zselect
|
||||
done
|
||||
if ! (( read_something )); then
|
||||
print "connection with fd $connection closed" >&2
|
||||
print "connection with fd $connection closed"
|
||||
unset fds[$connection]
|
||||
exec {connection}>&- # free the file descriptor
|
||||
fi
|
||||
|
@ -68,7 +68,6 @@ exec < /dev/null
|
|||
zmodload zsh/zpty
|
||||
zmodload zsh/zselect
|
||||
zmodload zsh/net/socket
|
||||
zmodload zsh/net/socket
|
||||
setopt noglob
|
||||
print "autosuggestion server started, pid: $$"
|
||||
|
||||
|
|
Loading…
Reference in a new issue