소스 검색

Go back to tracking last pid because `kill %1` didn't seem to be working

pull/180/head
Eric Freese 7 년 전
부모
커밋
6c5cd42331
2개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. +4
    -1
      src/async.zsh
  2. +4
    -1
      zsh-autosuggestions.zsh

+ 4
- 1
src/async.zsh 파일 보기

@ -16,13 +16,16 @@ _zsh_autosuggest_async_suggestion_server() {
stty -onlcr
local strategy=$1
local last_pid
while IFS='' read -r -d $'\0' prefix; do
# Kill last bg process
kill -KILL %1 &>/dev/null
kill -KILL $last_pid &>/dev/null
# Run suggestion search in the background
(echo -n -E "$($strategy "$prefix")"$'\0') &
last_pid=$!
done
}

+ 4
- 1
zsh-autosuggestions.zsh 파일 보기

@ -511,13 +511,16 @@ _zsh_autosuggest_async_suggestion_server() {
stty -onlcr
local strategy=$1
local last_pid
while IFS='' read -r -d $'\0' prefix; do
# Kill last bg process
kill -KILL %1 &>/dev/null
kill -KILL $last_pid &>/dev/null
# Run suggestion search in the background
(echo -n -E "$($strategy "$prefix")"$'\0') &
last_pid=$!
done
}

불러오는 중...
취소
저장