From 1c74307d462ebc9b65692d0d5ff0e1384960e020 Mon Sep 17 00:00:00 2001 From: desktop Date: Fri, 8 Dec 2023 15:09:09 +0300 Subject: [PATCH] ps : show all proc by default. --- .config/bash/module/ps.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.config/bash/module/ps.sh b/.config/bash/module/ps.sh index c4e86e5..26a9c80 100644 --- a/.config/bash/module/ps.sh +++ b/.config/bash/module/ps.sh @@ -1,12 +1,11 @@ # Find process and filter. -# Usage: ps +# Usage: ps [PROCESS] function ps() { local process="${1}" if [[ "${process}" = "" ]]; then - help ps - return 2 + /usr/bin/ps aux + else + /usr/bin/ps aux | sed -n -e "1p" -e "/${process}/Ip" fi - - /usr/bin/ps aux | sed -n -e "1p" -e "/${process}/Ip" }