From d2165ca7e917e678b321d9c3ce6a873dd0e2d547 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 25 Apr 2023 21:13:57 +0200 Subject: [PATCH] Use path basename --- share/functions/__fish_print_interfaces.fish | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/share/functions/__fish_print_interfaces.fish b/share/functions/__fish_print_interfaces.fish index 01a497640..3677bd409 100644 --- a/share/functions/__fish_print_interfaces.fish +++ b/share/functions/__fish_print_interfaces.fish @@ -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