mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
8 lines
295 B
Fish
8 lines
295 B
Fish
function __fish_print_interfaces --description "Print a list of known network interfaces"
|
|
if test -d /sys/class/net
|
|
set -l interfaces /sys/class/net/*
|
|
string replace /sys/class/net/ '' $interfaces
|
|
else # OSX/BSD
|
|
command ifconfig -l | string split ' '
|
|
end
|
|
end
|