From 7250e6fa6a1647b6d6f264b86352953fdfc78e25 Mon Sep 17 00:00:00 2001 From: NextAlone <12210746+NextAlone@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:36:54 +0800 Subject: [PATCH] completion(loginctl): fix sessions with ssh or other states (#10038) Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com> --- share/completions/loginctl.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/loginctl.fish b/share/completions/loginctl.fish index 887a4a7a5..e3b883937 100644 --- a/share/completions/loginctl.fish +++ b/share/completions/loginctl.fish @@ -30,7 +30,7 @@ complete -c loginctl -f -n "not $seen $commands" -l version -d "Show package ver function __fish_loginctl_list_sessions - loginctl list-sessions --no-legend --no-pager --output=short | string replace -r '(\d+) \d+ (\S+) \S+ (\S+) .*' '$1\t$2 at $3' + loginctl list-sessions --no-legend --no-pager --output=short | string replace -r '^\s*(\d+)\s+\d+\s+(\S+)\s+(\S+\s+)?(\S+\d+).*' '$1\t$2 at $4' end