From 7a7c0d64909a9969ced312c9acbfa8e8fd82a126 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 16 Dec 2025 05:53:55 +0100 Subject: [PATCH] __fish_systemctl_services: remove code clone --- share/functions/__fish_systemctl_services.fish | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/share/functions/__fish_systemctl_services.fish b/share/functions/__fish_systemctl_services.fish index b664513c7..5f73911a8 100644 --- a/share/functions/__fish_systemctl_services.fish +++ b/share/functions/__fish_systemctl_services.fish @@ -7,13 +7,14 @@ function __fish_systemctl_services # We don't want to complete with ANSI color codes set -lu SYSTEMD_COLORS + set -l common_args --full --no-legend --no-pager --plain --type=service if __fish_contains_opt user - systemctl --user list-unit-files --full --no-legend --no-pager --plain --type=service 2>/dev/null | string split -f 1 ' ' - systemctl --user list-units --state=loaded --full --no-legend --no-pager --plain --type=service 2>/dev/null | string split -f 1 ' ' + systemctl --user list-unit-files $common_args + systemctl --user list-units --state=loaded $common_args else # list-unit-files will also show disabled units - systemctl list-unit-files --full --no-legend --no-pager --plain --type=service 2>/dev/null | string split -f 1 ' ' + systemctl list-unit-files $common_args # list-units will not show disabled units but will show instances (like wpa_supplicant@wlan0.service) - systemctl list-units --state=loaded --full --no-legend --no-pager --plain --type=service 2>/dev/null | string split -f 1 ' ' - end + systemctl list-units --state=loaded $common_args + end 2>/dev/null | string split -f 1 ' ' end