commit 4ff1b3fbfa988e863aa2ab915313783ff2fa6020 from: Dominik Lang date: Tue Mar 12 20:32:31 2024 UTC Add OpenBSD dhcpleasctl completions. commit - 481afb156a9ba953a58ad7bb4d821b1ab03ddaef commit + 4ff1b3fbfa988e863aa2ab915313783ff2fa6020 blob - /dev/null blob + f3f2deae50877f6f2fbe6d57afe31f878607a4f1 (mode 644) --- /dev/null +++ dhcpleasectl.nu @@ -0,0 +1,12 @@ +def "nu-complete dhcpleasectl interfaces" [] { + ifconfig | grep -E '^[a-zA-Z0-9]+:' | lines | str replace -r ":.*$" "" +} + +# The dhcpleasectl program instructs dhcpleased(8) daemon to request a new lease +export extern main [ + interface: string@"nu-complete dhcpleasectl interfaces" # Use the specified interface + -l # List the configured lease on interface instead of requesting a new lease + -s: path # Use socket instead of the default /dev/dhcpleased.sock to communicate with dhcpleased(8) + -w: number # Specify the maximum number of seconds to wait for interface to be configured. The default is to wait 10 seconds unless -l is specified. +] +