fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
4a9fd1bbb
master
1#loginctl (systemd 254) 2 3#variables 4set -l seen __fish_seen_subcommand_from 5set -l commands activate attach disable-linger enable-linger flush-devices kill-session kill-user list-seats list-sessions list-users lock-session lock-sessions seat-status session-status show-seat show-session show-user terminate-seat terminate-session terminate-user unlock-session unlock-sessions user-status 6set -l output cat export json json-pretty json-seq json-sse short short-full short-iso short-iso-precise short-monotonic short-precise short-unix verbose with-unit 7 8complete -c loginctl -f 9 10#commands 11complete -c loginctl -x -n"not $seen $commands " -a" $commands " 12 13#options 14complete -c loginctl -f -n"not $seen $commands " -l all -s a -d"Show all properties, including empty ones" 15complete -c loginctl -f -n"not $seen $commands " -l full -s l -d"Do not ellipsize output" 16complete -c loginctl -f -n"not $seen $commands " -l help -s h -d"Show this help" 17complete -c loginctl -x -n"not $seen $commands " -l host -s H -d"Operate on remote host" 18complete -c loginctl -x -n"not $seen $commands " -l kill-who -d"Who to send signal to" 19complete -c loginctl -x -n"not $seen $commands " -l lines -s n -d"Number of journal entries to show" 20complete -c loginctl -x -n"not $seen $commands " -l machine -s M -d"Operate on local container" 21complete -c loginctl -f -n"not $seen $commands " -l no-ask-password -d"Don't prompt for password" 22complete -c loginctl -f -n"not $seen $commands " -l no-legend -d"Do not show the headers and footers" 23complete -c loginctl -f -n"not $seen $commands " -l no-pager -d"Do not pipe output into a pager" 24complete -c loginctl -x -n"not $seen $commands " -l output -s o -a" $output " -d"Change journal output mode" 25complete -c loginctl -x -n"not $seen $commands " -l property -s p -d"Show only properties by this name" 26complete -c loginctl -x -n"not $seen $commands " -s P -d"Equivalent to --value --property" 27complete -c loginctl -x -n"not $seen $commands " -l signal -s s -d"Which signal to send" 28complete -c loginctl -f -n"not $seen $commands " -l value -d"When showing properties, only print the value" 29complete -c loginctl -f -n"not $seen $commands " -l version -d"Show package version" 30 31function __fish_loginctl_list_sessions 32loginctl list-sessions --no-legend --no-pager --output=short| string replace -r'^\s*(\S+)\s+\d+\s+(\S+)\s+(\S+).*' '$1\t$2 at $3' 33end 34 35function __fish_loginctl_list_users 36loginctl list-users --no-legend --no-pager --output=short| string replace -r'(\d+) (\S+) .*' '$1\t$2' 37end 38 39function __fish_loginctl_list_seats 40loginctl list-seats --no-legend --no-pager --output=short 41end 42 43complete -c loginctl -n" $seen session-status show-session activate lock-session unlock-session terminate-session kill-session" -a'(__fish_loginctl_list_sessions)' 44complete -c loginctl -n" $seen user-status show-user enable-linger disable-linger terminate-user kill-user" -a'(__fish_loginctl_list_users)' 45complete -c loginctl -n" $seen seat-status show-seat attach terminate-seat" -a'(__fish_loginctl_list_seats)'