Yes, you are right. There are some differencies in behaviour.
These are the known issues but these issues have different status.
1. (About defaults). It's planned to fix. But it's not obvious for me
what the right way to implement this feature. The original clish has
the linear list of parameters. The klish has the tree-like parameters.
See the nested parameters, "switch". So some branches can be not used
in some cases. Must it be set to defaults? Or the parameters on the
selected path only must be set? What do you think about it?
2. I think it's a right behaviour because the user wants to know what
he can enter at this moment but not all possible arguments. CISCO uses
such scheme and i agree with them. Additionally the tree-like
parameter structure (in klish) is difficult for understanding imho.
And It's difficult to display adequate help for it. However there is
the DETAIL tag for the COMMAND. In recent SVN revision it will be
displayed when the "?" is entered twice. May be it's good to display
all parameters help together with the DETAILs.
3. The are three different special chars in klish. These are <tab>,
<space> and "?". The <tab> is completion key. The space can make
completion too in some cases. The "?" is help key.
The <tab> displays all possible completions for current param, not
help. It's planned to implement options and mechanisms to set
arbitrary completions for the params. For example list of files or
other predefined values. how can it be combined with help messages? I
think it will be not good. The "?" key will display the parameter
help.
Serj
2011/3/31 Lynn Scott <roger.ly...@gmail.com>:
Please use "Reply to all" when you answer. To send copy to klish
mailing list too.
> P.S. On a different note, please confirm that KLISH's binary results are
> clish, klish klishd. clish is the primary binary correct? what does klish
> do?
The main binaries is clish, konfd, konf. There is no klish, klishd binaries.
clish - the command line interface console application
konfd - daemon to store CISCO-like configuration (running-config).
konf - utility to communicate to konfd daemon
The klish is the clish's wrapper shell script only for klish examples.
It's not the main binary.
> [Lynn] some good points to this. From an implementation standpoint I agree
> that there are some issues. You could do a lazy initialization as the tree
> branches come into scope, however from a consumer/user of this product, my
> organization likes the defaults to be preset because we have some commands
> (that are linear) that may consist of several parameters and only a small
> subset are required while all the rest come with preset defaults that can be
> overidden by specifying them on the command line. To have to specify or add
> logic to determine if they are set in the <ACTION></> is kinda messy
> especially if this is a multiple occurance. Make sense?
I'm not about implementation only. The non-linear params with defaults
is more difficult to implement but it's possible. I'm trying to
explain the logical issue. For example we have the optional argument
with optional value (that have default). Like "count 5" The "count" is
optional subcommand, the "5" is optional param nested into "count".
Must it have the value if "count" is not specified at all? I't the
simplest example. I can imagine more complex examples with "switch"
that have nested param branches. Must be the params from unused
branches set to its defaults? Logically... not implementation.
And i agree that messy action is not good. It must be fixed.
> [Lynn] I was unaware that this was Cisco type behavior. I will give it
> some more thought.
It was my little misinformation about CISCO. I have recheck it today.
CISCO has poor <tab>. It works only when the single completion can be
detected. Else it makes <cr> only. But the "?" on parameters works
like the klish's "?". It shows only current param help. But CISCO has
no help for whole command parameters list (or i don't know how to get
it :) ).
Serj
> if user types 'give' and '?' it will only display "me" and it's help. The
> user will not know that he can also type a parameter.
It was already fixed in current svn revision. Same issue for
completions was fixed too. It will be accessible in 1.4.2 version.
> Again the same issue, "give" and "?" gives only "me" and we do not know that
> we can press enter.
Yes. It's an issue. Do you like the CISCO behaviour? CISCO display
"<cr>" among a possible params when the "?" is pressed.
Probably I'll implement your variant of default values. Note that each
PARAM with "default" field will become optional automatically.
Serj
2011/4/1 Lynn Scott <roger.ly...@gmail.com>:
I have fixed the PARAM's default field behaviour.
I was wrong when say: "Note that each
PARAM with "default" field will become optional automatically." It
must not became optional automatically. For example we have ping
command with "repeat" option.
<------><------><PARAM name="repeat"
<------><------><------>help="Requests to send count, default is 5"
<------><------><------>optional="true"
<------><------><------>mode="subcommand"
<------><------><------>ptype="SUBCOMMAND">
<------><------><------><PARAM name="count"
<------><------><------><------>help="Requests count"
<------><------><------><------>ptype="UINT"
<------><------><------><------>default="5"/>
<------><------></PARAM>
The "count" PARAM is not optional but can get default value because
its parent PARAM "repeat" is optional.
So please test the svn revision 415 for default field functionality.
If it's good enough I will create a new release soon.
Serj
2011/4/1 Lynn Scott <roger.ly...@gmail.com>:
svn checkout http://klish.googlecode.com/svn/trunk/ klish-read-only -r 415
Serj
2011/4/12 Lynn Scott <roger.ly...@gmail.com>:
The help with possible "<cr>" was implemented in svn revision 417.
Use klish-1.4.2. It contains these changes.
The ENODATA is a possible value of errno. (See 'man errno'). The
errno.h is included into the shell_tinyrl.c. The errno.h must contain
this define. The manpage says that ENODATA is POSIX. It's strange for
me that FreeBSD has no ENODATA. Can you check FreeBSD headers for the
ENODATA and other possible errno values? If there is no ENODATA i will
choose another errno value to indicate the problem.
I have no FreeBSD installed so it's hard for me to test klish on it.
2011/4/24 Lynn Scott <roger.ly...@gmail.com>:
2011/4/24 Lynn Scott <roger.ly...@gmail.com>:
Probably I'll install a FreeBSD into VirtualBox and try to compile klish.
2011/4/25 Lynn Scott <roger.ly...@gmail.com>:
The BSD bug and warnings were fixed. Use 1.4.3 version.
Serj Kalichev
2011/4/25 Lynn Scott <roger.ly...@gmail.com>: