You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
push([string|function], {object}) — push next interpreter on the stack and call that interpreter. First argument is new interpreter (the same as first argument to terminal). The second argument is a list of options as folow:
name — to distinguish interpreters using command line history.
prompt — new prompt for this terminal.
onExit — callback function called on Exit.
onStart — callback function called on Start.
keydown — interpreter keydown event.
historyFilter — the same as in terminal in next version.
completion — the same as in terminal.
login — same as [login](https://terminal.jcubic.pl/api_reference.php#login) main option or calling login method after push.
keymap — same as [keymap in terminal](https://terminal.jcubic.pl/api_reference.php#terminal_keymap).
mousewheel — interpreter based mousewheel handler.
infiniteLogin — if set to true it will ask infinetly for username and password if login is set.
Additionally everything that is passed within the object will be stored with interpreter on the stack — so it can be pop later. See also [Multiple intepreters example](https://terminal.jcubic.pl/examples.php#multiple_interpreters).
Updated the types for push all terminal events should work with the nested interpreter (added with push) because all of them are triggered with the same function trigger_event, there is also an issue with login events, because onBeforeLogin triggers a global event when using push and local when using automatic login if the token is defined.
Because of this, I didn't include login events in the push options.
Issue summary
The docs:
TypeScript declaration:
The text was updated successfully, but these errors were encountered: