entry.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <KLISH
  3. xmlns="https://klish.libcode.org/klish3"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xsi:schemaLocation="https://src.libcode.org/pkun/klish/src/master/klish.xsd">
  6. <!-- klish-3.0.0 XML config example -->
  7. <!-- VIEW. Views are not visible for path. Switch because you must choose one of the commands -->
  8. <ENTRY name="main" mode="switch" container="true">
  9. <!-- COMMAND -->
  10. <ENTRY name="cmd" help="Clear settings" mode="sequence">
  11. <!-- SWITCH container. Container is not visible while CLI session -->
  12. <ENTRY name="opt" help="Switch subcommand" mode="switch" container="true">
  13. <!-- PARAMs (switched) -->
  14. <ENTRY name="o1" help="Clear callerid_number_prepend assignment" />
  15. <ENTRY name="o2" help="Clear record assignment" />
  16. <ENTRY name="o3" help="Clear callerid assignment" />
  17. <ENTRY name="o4" help="Clear a schedule">
  18. <!-- subPARAM -->
  19. <ENTRY name="o5" help="Include number">
  20. </ENTRY>
  21. </ENTRY>
  22. <ENTRY name="o6" help="Clear callerid_number_remove assignment" />
  23. <ENTRY name="o7" help="Clear callerid_number_postpend assignment" />
  24. <ENTRY name="o8" help="Clear callerid_number_replace assignment" />
  25. </ENTRY>
  26. <ACTION sym="nop" exec_on="always">
  27. ps aux
  28. </ACTION>
  29. </ENTRY>
  30. <!-- Another COMMAND. Sequence means that all subENTRYes can be entered simultaneously -->
  31. <ENTRY name="cmd1" help="Clear settings" mode="sequence" purpose="common">
  32. <!-- PTYPE. Special purpose=ptype. Link to previosly defined "COMMAND" PTYPE -->
  33. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  34. <!-- COND. Conditional expression. Is parent COMMAND visible? -->
  35. <ENTRY name="o2" purpose="cond"/>
  36. <ENTRY name="o1" help="Clear callerid_number_prepend assignment">
  37. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  38. </ENTRY>
  39. <ENTRY name="o3" help="Clear callerid_number_prepend assignment">
  40. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  41. </ENTRY>
  42. <!-- Conditional ACTIONs -->
  43. <ACTION sym="tsym" exec_on="always">0</ACTION>
  44. <ACTION sym="tsym" exec_on="always">1</ACTION>
  45. <ACTION sym="tsym" exec_on="fail">2</ACTION>
  46. <ACTION sym="tsym" exec_on="never">3</ACTION>
  47. <ACTION sym="tsym" exec_on="always" sync="true">4</ACTION>
  48. <ACTION sym="tsym" exec_on="always"></ACTION>
  49. <ACTION sym="tsym" exec_on="success">5</ACTION>
  50. <ACTION sym="tsym" exec_on="always">6</ACTION>
  51. </ENTRY>
  52. </ENTRY>
  53. </KLISH>