From 4d864aea1c6fbd0e8e25055c06e4b9449708f14b Mon Sep 17 00:00:00 2001 From: Wilke Schwiedop Date: Sun, 15 Apr 2018 18:58:53 +0200 Subject: [PATCH] remove sed from __fish_print_addresses.fish --- share/functions/__fish_print_addresses.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/__fish_print_addresses.fish b/share/functions/__fish_print_addresses.fish index 356c8559c..1bb6cd7a7 100644 --- a/share/functions/__fish_print_addresses.fish +++ b/share/functions/__fish_print_addresses.fish @@ -1,6 +1,6 @@ function __fish_print_addresses --description "Print a list of known network addresses" if command -sq ip - command ip --oneline address | cut -d" " -f7 | sed "s:\(.*\)/.*:\1:" + command ip --oneline address | string replace -r '(\S+\s+){3}(.+)/.*' '$2' else if command -sq ifconfig # This is for OSX/BSD # There's also linux ifconfig but that has at least two different output formats