mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
Do not use state mechanism
Call a dispatch function instead, simplifying the nested select case.
This commit is contained in:
@@ -73,11 +73,11 @@ _port() {
|
||||
'-y[Perform a dry run.]' \
|
||||
'-t[enable trace mode debug facilities on platforms that support it (Mac OS X).]' \
|
||||
"1:Port actions:($actions)" \
|
||||
'*:extra:->extra' \
|
||||
'*:extra:_port_dispatch' \
|
||||
&& return 0
|
||||
}
|
||||
|
||||
case "$state" in
|
||||
extra)
|
||||
_port_dispatch() {
|
||||
case "$words[2]" in
|
||||
provides)
|
||||
_files
|
||||
@@ -123,8 +123,6 @@ _port() {
|
||||
"pseudo-advanced:Advanced Pseudo-portnames:($pseudo_advanced)"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_port_select() {
|
||||
|
||||
Reference in New Issue
Block a user