mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
completions/loginctl: accept alphabetic session names
systemd's session_id_valid accepts [a-zA-Z0-9], so allowing only numbers is wrong. Fixes #11754 While at it, correct the description; instead of showing the leader PID, show the seat, which is probably
This commit is contained in:
@@ -29,7 +29,7 @@ complete -c loginctl -f -n "not $seen $commands" -l value -d "When showing prope
|
||||
complete -c loginctl -f -n "not $seen $commands" -l version -d "Show package version"
|
||||
|
||||
function __fish_loginctl_list_sessions
|
||||
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'
|
||||
loginctl list-sessions --no-legend --no-pager --output=short | string replace -r '^\s*(\S+)\s+\d+\s+(\S+)\s+(\S+).*' '$1\t$2 at $3'
|
||||
end
|
||||
|
||||
function __fish_loginctl_list_users
|
||||
|
||||
Reference in New Issue
Block a user