1
0
Fork 0

Merging upstream version 3.7.8.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-05 08:08:50 +01:00
parent 099007bbc4
commit a3c6363c26
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
52 changed files with 13518 additions and 998 deletions

View file

@ -135,8 +135,7 @@ proc ly_completion {input output} {
global prompt
send -- "${input}\t"
# expecting echoing input, output and 10 terminal control characters
expect -re "^${input}\r${prompt}${output}.*\r.*$"
expect -re "${input}${output}"
}
# Send a completion request and check if the anchored regex hint options match.
@ -146,11 +145,13 @@ proc ly_hint {input prev_input hints} {
set output {}
foreach i $hints {
# each element might have some number of spaces and CRLF around it
append output "${i} *(?:\\r\\n)?"
append output "${i} *(\\r\\n)?"
}
set termcode1 "\r\\u001b\\\[0K"
set termcode2 ".*"
send -- "${input}\t"
# expecting the hints, previous input from which the hints were generated
# and some number of terminal control characters
expect -re "${output}\r${prompt}${prev_input}.*\r.*$"
expect -re "${output}${termcode1}${prompt}${prev_input}${termcode2}"
}