fish-shell/share/completions/netcat.fish

13 lines
362 B
Fish
Raw Normal View History

# 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' (netcat -h 2>&1)[1]
set flavor nc.openbsd
else
2023-01-25 19:05:55 +00:00
set flavor (command -s netcat | path resolve | path basename)
end
__fish_complete_netcat netcat $flavor