From 59eb75021bbcc39a0c75ea77bb9dd1382dc22f0e Mon Sep 17 00:00:00 2001 From: Mehul Tikekar Date: Wed, 18 Jan 2017 12:50:43 -0500 Subject: [PATCH] Remove cd in __fish_print_interfaces --- share/functions/__fish_print_interfaces.fish | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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