nested params on switch mode

8 views
Skip to first unread message

Mohammad RafatPanah

unread,
Apr 6, 2025, 4:38:57 AMApr 6
to klish
Hi, I have a difficulty in using nested params in switch mode.
Suppose we want to use a nested param after each item of a switched param, so is there any way to use a nested param on the whole switched param, or must it be added to each option of switched params recursively?
I'm using 2.1.4 klish.

Serj Kalichev

unread,
Apr 7, 2025, 4:06:24 AMApr 7
to kl...@googlegroups.com
Hi

Try something like this (pseudocode):

<COMMAND ...>
    <PARAM name="p1".../>
    <SWITCH>
        <PARAM name="sp1"/>
        <PARAM name="sp2"/>
   </SWITCH>
   <PARAM name="p2"/>
</COMMAND>

You need to enter p1 first, then one of the switch's nested params, and then p2. Probably you mean "p2" PARAM


On 06.04.2025 11:38, Mohammad RafatPanah wrote:
Hi, I have a difficulty in using nested params in switch mode.
Suppose we want to use a nested param after each item of a switched param, so is there any way to use a nested param on the whole switched param, or must it be added to each option of switched params recursively?
I'm using 2.1.4 klish. --
You received this message because you are subscribed to the Google Groups "klish" group.
To unsubscribe from this group and stop receiving emails from it, send an email to klish+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/klish/b76c69f4-7bf5-4ab0-8b33-8c20524df973n%40googlegroups.com.


Message has been deleted

Mohammad RafatPanah

unread,
Apr 14, 2025, 7:54:54 AMApr 14
to klish
Thanks, Serj.
I have resolved the problem with test in param.
Some thing like this:

 <PARAM name="s1"... mode="switch" optional="true">
       <PARAM name="sp1"..../>
       <PARAM name="sp2" .../>
</PARAM>
<PARAM name="s2" test='${s1}'.../>

Reply all
Reply to author
Forward
0 new messages