berkus / enso

Automatically exported from code.google.com/p/enso
Other
1 stars 0 forks source link

Commands with similar prefixes can become ambiguous #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Add the following to your ~/.ensocommands:

  class DoSomethingCommand(object):
    def __call__(self, ensoapi, target):
        ensoapi.display_message( "'do something' target is: %s" % target )

  class DoSomethingWithCommand(object):
    def __call__(self, ensoapi, target):
        ensoapi.display_message( "'do something with' target is: %s" % target )

  cmd_do_something = DoSomethingCommand()
  cmd_do_something_with = DoSomethingWithCommand()

Then run the command 'do something with blah'.

What is the expected output? What do you see instead?

You should get a primary message that says "'do something with' target is:
blah', but instead you get "'do something' target is: with blah".

Original issue reported on code.google.com by var...@gmail.com on 28 Mar 2008 at 2:35