From ccf2fdf0d7236db3c132a3833b0e8771b7325484 Mon Sep 17 00:00:00 2001 From: Tomasz Kapias Date: Sun, 19 Mar 2023 23:20:29 +0700 Subject: [PATCH] update lservices function --- .bashrc.d/11-functions.bashrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.bashrc.d/11-functions.bashrc b/.bashrc.d/11-functions.bashrc index a34761c..af04198 100644 --- a/.bashrc.d/11-functions.bashrc +++ b/.bashrc.d/11-functions.bashrc @@ -140,11 +140,11 @@ lservices() { fi if [[ "$_UID" == "0" ]]; then - local _OUT=$(sudo systemctl list-units --system -q --plain --full --no-pager -t service,scope | sort) + local _OUT=$(sudo systemctl list-units --system -q --plain --full --no-pager -t service,scope | grep -E '.scope|.service' | sort) elif [[ "$_UID" == "$(id -u)" ]]; then - local _OUT=$(systemctl list-units --user -q --plain --full --no-pager -t service,scope | sort) + local _OUT=$(systemctl list-units --user -q --plain --full --no-pager -t service,scope | grep -E '.scope|.service' | sort) else - local _OUT=$(sudo machinectl -q shell --uid="$_UID" .host /usr/bin/systemctl list-units --user -q --plain --full --no-pager -t service,scope | sort) + local _OUT=$(sudo machinectl -q shell --uid="$_UID" .host /usr/bin/systemctl list-units --user -q --plain --full --no-pager -t service,scope | grep -E '.scope|.service' | sort) fi if [[ $_XCLIP == 1 ]]; then