diff --git a/share/functions/__fish_print_interfaces.fish b/share/functions/__fish_print_interfaces.fish index db75a280f..d079c150f 100644 --- a/share/functions/__fish_print_interfaces.fish +++ b/share/functions/__fish_print_interfaces.fish @@ -1,9 +1,7 @@ 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 + set -l interfaces /sys/class/net/* + string replace /sys/class/net/ '' $interfaces else # OSX/BSD command ifconfig -l | string split ' ' end