Changed how command not found errors are handled by default: Implemented a cos-likeness algorithm (Coling 2008) for comparing strings, which allows for decent suggestions and speed.
This commit is contained in:
parent
4678234e9a
commit
0c292b5ff2
4 changed files with 76 additions and 12 deletions
|
|
@ -382,3 +382,12 @@ class CmdSet(object):
|
|||
by use of self.add().
|
||||
"""
|
||||
pass
|
||||
|
||||
def get_all_cmd_keys_and_aliases(self):
|
||||
"""
|
||||
Returns a list of all command keys and aliases
|
||||
available in this cmdset.
|
||||
"""
|
||||
names = [cmd.key for cmd in self.commands]
|
||||
[names.extend(cmd.aliases) for cmd in self.commands]
|
||||
return names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue