mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
10 lines
228 B
Fish
10 lines
228 B
Fish
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
|
|
command ifconfig -l | tr ' ' '\n'
|
|
end
|
|
end
|