zsh/_networkctl: remove duplicated argument for completion (#31926)

It is unnecessary, which will mess the completion.
This commit is contained in:
Collin L
2024-07-22 17:36:47 +08:00
committed by GitHub
parent 6d9d14e516
commit 733518b413

View File

@@ -29,7 +29,7 @@
(list|status|up|down|cat|edit|lldp|delete|renew|forcerenew|reconfigure)
for link in ${(f)"$(_call_program links networkctl list --no-legend)"}; do _links+=($link[(w)2]:$link); done
if [[ -n "$_links" ]]; then
_describe -t links 'links' _links _links $( [[ $cmd == (edit|cat) ]] && print -- -P@ )
_describe -t links 'links' _links $( [[ $cmd == (edit|cat) ]] && print -- -P@ )
else
_message "no links"
fi