summaryrefslogtreecommitdiff
path: root/ar/.config/zsh/scripts.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'ar/.config/zsh/scripts.zsh')
-rw-r--r--ar/.config/zsh/scripts.zsh8
1 files changed, 3 insertions, 5 deletions
diff --git a/ar/.config/zsh/scripts.zsh b/ar/.config/zsh/scripts.zsh
index 6c217e8..81ab402 100644
--- a/ar/.config/zsh/scripts.zsh
+++ b/ar/.config/zsh/scripts.zsh
@@ -449,11 +449,9 @@ function fzf_kill_process() {
--bind 'F2:toggle-preview' |
awk '{print $2}' |
xargs -r bash -c '
- if ! kill "$1" 2>/dev/null; then
- if ! kill -9 "$1"; then
- echo "Regular kill failed. Attempting with sudo..."
- sudo kill "$1" || echo "Failed to kill process $1" >&2
- fi
+ if ! kill -9 "$1" 2>/dev/null; then
+ echo "Regular kill failed. Attempting with sudo..."
+ sudo kill -9 "$1" || echo "Failed to kill process $1" >&2
fi
' --
}