From 84c7cfaa895e0ecf7bd5e86665b79983c7b5669d Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Fri, 25 Aug 2023 15:20:40 -0600 Subject: [PATCH] Prevent parameter value being interpreted as kill flag --- src/async.zsh | 2 +- zsh-autosuggestions.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/async.zsh b/src/async.zsh index d13e35a..d08d944 100644 --- a/src/async.zsh +++ b/src/async.zsh @@ -16,7 +16,7 @@ _zsh_autosuggest_async_request() { # We won't know the pid unless the user has zsh/system module installed if (( _ZSH_AUTOSUGGEST_CHILD_PID )); then - kill -TERM $_ZSH_AUTOSUGGEST_CHILD_PID 2>/dev/null + kill -TERM -- $_ZSH_AUTOSUGGEST_CHILD_PID 2>/dev/null fi fi diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index b3f2522..bd5aa3c 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -771,7 +771,7 @@ _zsh_autosuggest_async_request() { # We won't know the pid unless the user has zsh/system module installed if (( _ZSH_AUTOSUGGEST_CHILD_PID )); then - kill -TERM $_ZSH_AUTOSUGGEST_CHILD_PID 2>/dev/null + kill -TERM -- $_ZSH_AUTOSUGGEST_CHILD_PID 2>/dev/null fi fi