Use path basename

This commit is contained in:
Fabian Boehm 2023-04-25 21:13:57 +02:00
parent b76e6c5637
commit d2165ca7e9

View File

@ -1,7 +1,6 @@
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
path basename /sys/class/net/*
else # OSX/BSD
set -l os (uname)
if string match -e -q BSD -- $os