Ease the use of klish as a file processor
Under various Unixes, klish can be used as a batch file processor :
cat command_list | klish
klish -c command_list
Some support is already here to handle this feature but that support is incomplete.
Unfortunately, there are some difficulties to overcome when used as is.
- it seems you cannot have more that one space char before a command ; this disallow you to write a command_list which is well formatted
- comments are quite difficult to setup ; support for various comment scheme (#, !...) could help here
While it's possible to work around these limitations, it might be a good idea to ease file processing.
The following features might be of interest :
- add an XML tags to define the comment-start character. if the tag is not present, fallback to the default comment-start char (the tag should not appear in a view; it's effect is global ; best place to put it is in startup.xml).
<COMMENT character="#" />
If more than one COMMENT tag is found, an error occurs.
- ignore multiple whitespace at the beginning of a line when the input comes from a file.
#1 Updated by Serj Kalichev over 4 years ago
- Status changed from New to Feedback
Try to use:
The ! is defined as:
<COMMAND name="!" help="Comments" args="args" args_help="Comments">
You can use # or anything you want. There is no builtin comment symbol in klish.