prompt-toolkit / python-prompt-toolkit

Library for building powerful interactive command line applications in Python
https://python-prompt-toolkit.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
9.1k stars 717 forks source link

Allow using different separator for nested completion #1814

Open robamu opened 7 months ago

robamu commented 7 months ago

Hi,

Thanks for creating this great package!

I am currently working on a command definition tree and on a feature which allows picking a path through the tree. I would like to have auto-completion for this, but the resultant path should be path-like, with slashes as separators.

The nested completer currently only allows space as the separator. It would be nice if it would be possible to change the separator. I think strings like ":", "::" and "/" might be other commonly used separators used together with the nested completer.

I can prepare a PR for this.

Kind Regards Robin