Share

Natural CLI

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Issue with a particular syntax

  1. 2008-07-07 12:14:23 UTC
    Hello,

    In order to use all the power of Natural CLI, I've tried to use the following command syntax :

    command [a] [b] [c]

    which express exactly my needs (the user can choose any combinations of these optionals parameters).

    Unfortunately it did not work.

    I had a good parseResult with the command "command c" ; but I got a "No command matches" with "command a".
    It worked also with "command a b c".
    "command" wasn't interpreted as a command neither.

    I don't think I made a mistake on my side (I put only letters inside brackets), however I would appreciate if you could tell me that it works on your side or if this syntax isn't supposed to be used.

    Thanks.

  2. 2008-07-07 12:29:21 UTC
    I said "any combinations of these optionals parameters" but I should have say "any combinations of these optionals tokens"
  3. 2008-07-08 22:03:09 UTC
    Hi Ca

    I'm going to see what is happening. I hope I give you an answer shortly.

    Regards,

    Ferran
  4. 2008-07-08 22:54:38 UTC
    Hi again Cal,

    It seems that there are a bug when optional parameter is the last token and it is not present.

    In your example will work any combination but if "c" is not present. It means:

    command a b c => works
    command b c => works
    command a c => works
    command c => works
    command a b => hits the bug and fails
    command b => hits the bug and fails
    command a => hits the bug and fails
    command a => hits the bug and fails

    As an **ugly** workaround, you can add a "fake" last token, for instance:

    command [a] [b] [c] fake

    Of course, I'm going to check the code to solve this issue.

    Thanks a lot for reporting!

    Ferran
  5. 2008-07-09 12:00:26 UTC
    Thank you for you answer !

    I'm looking forward to getting your bug fix :)



  6. 2008-07-19 21:14:53 UTC
    Hi Cal,

    The bug in fixed in the new release. You can download it here:

    https://sourceforge.net/project/showfiles.php?group_id=208949

    Thanks for reporting!

    Ferran
  7. 2008-07-22 07:00:45 UTC
    Great :)

    Thank you
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.