classification
Title: cmd.Cmd: Allow other readline completion methods
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mannjani
Priority: normal Keywords:

Created on 2019-09-10 22:27 by mannjani, last changed 2019-09-10 22:27 by mannjani.

Messages (1)
msg351748 - (view) Author: Mann Jani (mannjani) * Date: 2019-09-10 22:27
readline has completion methods other than `complete` such as `menu-complete` or `menu-complete-backward` which behave differently.
Currently Cmd class has hardcoded `complete` method to the completion key which means trying to use other methods is not possible in a derived class without re-implementing cmdloop, or using some other crazy workarounds.

IMO Cmd.__init__ should take another argument named completionmethod with the default value of "complete" so that existing usage is not broken but it is possible to pass other values.
History
Date User Action Args
2019-09-10 22:27:54mannjanicreate