Do not use state mechanism

Call a dispatch function instead, simplifying the nested select case.
This commit is contained in:
Aljaž "g5pw" Srebrnič
2013-04-01 00:30:04 +02:00
parent 54ed122d25
commit 3e6040e01d
+3 -5
View File
@@ -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() {