mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
Use path basename
This commit is contained in:
parent
b76e6c5637
commit
d2165ca7e9
|
@ -1,7 +1,6 @@
|
||||||
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
|
||||||
set -l interfaces /sys/class/net/*
|
path basename /sys/class/net/*
|
||||||
string replace /sys/class/net/ '' $interfaces
|
|
||||||
else # OSX/BSD
|
else # OSX/BSD
|
||||||
set -l os (uname)
|
set -l os (uname)
|
||||||
if string match -e -q BSD -- $os
|
if string match -e -q BSD -- $os
|
||||||
|
|
Loading…
Reference in New Issue
Block a user