mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Remove cd in __fish_print_interfaces
This commit is contained in:
parent
d905ed33fe
commit
59eb75021b
1 changed files with 2 additions and 4 deletions
|
@ -1,9 +1,7 @@
|
||||||
function __fish_print_interfaces --description "Print a list of known network interfaces"
|
function __fish_print_interfaces --description "Print a list of known network interfaces"
|
||||||
if test -d /sys/class/net
|
if test -d /sys/class/net
|
||||||
cd /sys/class/net
|
set -l interfaces /sys/class/net/*
|
||||||
for i in *
|
string replace /sys/class/net/ '' $interfaces
|
||||||
echo $i
|
|
||||||
end
|
|
||||||
else # OSX/BSD
|
else # OSX/BSD
|
||||||
command ifconfig -l | string split ' '
|
command ifconfig -l | string split ' '
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue