From 8baf3716b2e4fc75e983692ef76e893bcf7dd6e4 Mon Sep 17 00:00:00 2001 From: Kyle Kneitinger Date: Fri, 2 Feb 2024 23:05:47 -0800 Subject: [PATCH] [sh] Add improved ps completion --- .zshrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.zshrc b/.zshrc index c897c4d..d9cb8e1 100644 --- a/.zshrc +++ b/.zshrc @@ -33,6 +33,13 @@ zstyle :compinstall filename '/home/leaf/.zshrc' # Remove need to manually execute `rehash` after changes to $PATH zstyle ':completion:*' rehash true +# Find ALL user procs when tab completeing procs +# shellcheck disable=SC2016 +zstyle ':completion:*:processes' command 'NOCOLORS=1 ps -U $(whoami)|sed "/ps/d"' +zstyle ':completion:*:processes' insert-ids menu yes select +zstyle ':completion:*:processes-names' command 'NOCOLORS=1 ps xho command|sed "s/://g"' +zstyle ':completion:*:processes' sort false + if type brew &>/dev/null; then # shellcheck disable=SC2206 fpath=("$(brew --prefix)/share/zsh-completions" $fpath)