mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
completions/netcat: Use path
This commit is contained in:
parent
cac483c67a
commit
7b8684e469
|
@ -6,7 +6,7 @@ set -l flavor
|
||||||
if string match -rq -- '^OpenBSD netcat' (nc -h 2>&1)[1]
|
if string match -rq -- '^OpenBSD netcat' (nc -h 2>&1)[1]
|
||||||
set flavor nc.openbsd
|
set flavor nc.openbsd
|
||||||
else
|
else
|
||||||
set flavor (basename (realpath (command -v nc)))
|
set flavor (command -s netcat | path resolve | path basename)
|
||||||
end
|
end
|
||||||
|
|
||||||
__fish_complete_netcat nc $flavor
|
__fish_complete_netcat nc $flavor
|
||||||
|
|
|
@ -6,7 +6,7 @@ set -l flavor
|
||||||
if string match -rq -- '^OpenBSD netcat' (netcat -h 2>&1)[1]
|
if string match -rq -- '^OpenBSD netcat' (netcat -h 2>&1)[1]
|
||||||
set flavor nc.openbsd
|
set flavor nc.openbsd
|
||||||
else
|
else
|
||||||
set flavor (basename (realpath (command -v netcat)))
|
set flavor (command -s netcat | path resolve | path basename)
|
||||||
end
|
end
|
||||||
|
|
||||||
__fish_complete_netcat netcat $flavor
|
__fish_complete_netcat netcat $flavor
|
||||||
|
|
Loading…
Reference in New Issue
Block a user