Possible to script the Interactive Prompt?
It does not seem to be possible to script the Interactive Prompt, e.g. clear the input, set the content, position the cursor?
Would it be possible to add these functions as part of "console" module in future release?
These features would be very useful for developing autocompletion/history for Shellista.
JonB last edited by
It is currently not possible...
However, the latest dev-modular branch has an auto completion history as a plugin.
Basically, typing tab at the end of the line then enter brings up an autocomplete ui dialog.
Also, there is ShellistaUI, which is a ui version of shellista, which has history buttons. What you are describing can be done with that module... That said, I've had lots of problems with ShellistaUI locking up after running other ui modules, which seems to be because of using a custom stdin and stdout. The right answer would be to redesign shellista to separate the Cmd bits, so that ShellistaUI can make use of command parsing, etc without having to override stdin.
JonB last edited by
Whoops, I lied, tab completion is only in the master.
I meant to create a plugin to port this over to dev-modular version....
There is a bash history plugin for modular, which uses !! type commands
Yeah I kinda figured it is currently no possible. Hopefully @omz can add these features in future release? Technically it should not be too difficult (especially compared to adding numpy and matplotlib).
I have looked at your autocompletion as well as the UI version before the original post. I think your implementation is quite clever. A history management could also be implemented using similar approach. But one major limitation is that one cannot really modify the command after using autocompletion. You can only append more string to the command or nuke the last argument. It is really quite limited.
As for the UI version, the main disadvantage is that you are limited to the UI and lose control to the builtin "editor" and "library" panes. So I'd rather prefer the text-based version.
If we can script the interactive prompt, it would be a game changer and opens up so much possibility. fingers crossed ...
omz last edited by
I have to admit that I didn't try ShellistaUI, but couldn't you just use the
'panel'presentation mode to retain access to the library/editor panes?
@omz sorry my bad. ShellistaUI does allow user to access other panes. Cool!