mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
de9f4cb252
- implement the most common netcat variants on Linux - nc.openbsd - nc.traditional - nc/netcat tries to guess which netcat is currently used
12 lines
341 B
Fish
12 lines
341 B
Fish
# There a several different implementations of netcat.
|
|
# Try to figure out which is the current used one
|
|
# and load the right set of completions.
|
|
|
|
set -l flavor
|
|
if string match -rq -- '^OpenBSD netcat' (nc -h 2>&1)[1]
|
|
set flavor nc.openbsd
|
|
else
|
|
set flavor (basename (realpath (command -v nc)))
|
|
end
|
|
|
|
__fish_complete_netcat nc $flavor
|