1

Hi I have small doubt in klish xml file. I implemented a small xml file for klish

<COMMAND name="show core"
         help="It will show core status"
  <ACTION> echo "core status"  </ACTION>
  </COMMAND>

I thought that by using command "show core" on klish command line it will print the core status as output but I am not able to print core status on command line of klish How to solve ?

vivek
  • 467
  • 2
  • 6
  • 18

1 Answers1

1

We can not use space in the < COMMAND > tag like in my case I used.

<COMMAND name="show core">

This is not the proper way to use space in the < COMMAND > tag

But if you want that your command should be like this only i.e. show core then there are two ways to achieve it.

First way:-

<COMMAND name="show"
         help="Put what help you want to give"/>
<COMMAND name="show core"
         help="Put what help you want to give">
      <DETAIL>   
      </DETAIL>
 <ACTION>echo "core status"</ACTION>
</COMMAND>

Second way:- Use VAR tag and completion attribute in PARAM tag

<COMMAND name="show"
         help="Put what help you want to give">
   <PARAM name="pname"
          help="Put what help you want to give"
          ptype="STRING"
          completion="${vartagvariable}"/>
    <DETAIL> 
    </DETAIL>
   <ACTION>echo "core status"</ACTION>
  <VAR name="vartagvariable" help="Something...." value="core" />
 </COMMAND>
vivek
  • 467
  • 2
  • 6
  • 18