mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
remove sed from __fish_print_addresses.fish
This commit is contained in:
parent
0fdc51beed
commit
4d864aea1c
1 changed files with 1 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
function __fish_print_addresses --description "Print a list of known network addresses"
|
function __fish_print_addresses --description "Print a list of known network addresses"
|
||||||
if command -sq ip
|
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
|
else if command -sq ifconfig
|
||||||
# This is for OSX/BSD
|
# This is for OSX/BSD
|
||||||
# There's also linux ifconfig but that has at least two different output formats
|
# There's also linux ifconfig but that has at least two different output formats
|
||||||
|
|
Loading…
Reference in a new issue