Files
fish-shell/share/functions/__fish_systemd_machines.fish
Carl Andersson 7a668fb17e Unset SYSTEMD_COLORS for systemd completion
Fixes an issue where systemctl and other systemd commands completions are prefixed by ANSI color escape codes
2025-05-07 18:23:51 -07:00

10 lines
307 B
Fish

# It seems machinectl will eliminate spaces from machine names so we don't need to handle that
function __fish_systemd_machines
# We don't want to complete with ANSI color codes
set -lu SYSTEMD_COLORS
machinectl --no-legend --no-pager list --all | while read -l a b
echo $a
end
end