fish-shell/share/functions/__fish_print_interfaces.fish

11 lines
233 B
Fish
Raw Normal View History

function __fish_print_interfaces --description "Print a list of known network interfaces"
if test -d /sys/class/net
cd /sys/class/net
for i in *
echo $i
end
else # OSX/BSD
2016-02-03 22:46:33 +00:00
command ifconfig -l | string split ' '
end
end