Files
fish-shell/share/functions/__fish_print_interfaces.fish
Johannes Altmanninger 2c0e912fe1 Mark private functions that don't need localization
See the next commit.

Part of #11833

(cherry picked from commit a53db72564)
2025-09-30 11:52:41 +02:00

14 lines
470 B
Fish

# localization: skip(private)
function __fish_print_interfaces --description "Print a list of known network interfaces"
if test -d /sys/class/net
path basename /sys/class/net/*
else # OSX/BSD
set -l os (uname)
if string match -e -q BSD -- $os
command ifconfig | string match -e -r '^[a-z]' | string replace -r ':.*' '' | string split ' '
else
command ifconfig -l | string split ' '
end
end
end