Skip to content

Conversation

rfourquet
Copy link
Member

The menus pops up via the , key.
Modes selected via , are sticky.
Help and shell modes remain non-sticky when entered via ; and ?.

Multiple keys have been proposed for accessing the menu, e.g. [ (in #14081 (comment)), but this is now taken, and , seems convenient.

This is implemented with TerminalMenus:

mode-switcher

It was suggested that you can use another key after the initial , to quickly select your mode: this would be future work, as an improvement of TerminalMenus, which I believe does't provide the necessary feature.

The menu pops up via the `,` key (when at beginning of input).
Modes selected via `,` are sticky.
Help and shell modes remain non-sticky when entered via `;` and `?`.
@rfourquet rfourquet added REPL Julia's REPL (Read Eval Print Loop) needs docs Documentation for this change is required needs news A NEWS entry is required for this change needs tests Unit tests are required for this change labels Nov 17, 2019
@rfourquet
Copy link
Member Author

Bump. Should this get the triage label?

@StefanKarpinski StefanKarpinski added the triage This should be discussed on a triage call label Oct 5, 2020
@brenhinkeller
Copy link
Contributor

So looks like this still needs docs and tests, but otherwise could potentially move forward and be discussed in triage?

Amazingly still no merge conflicts after three years!

@LilithHafner
Copy link
Member

Triage likes this with a few caveats and ideas

  • A major use could be for packages that add new repl modes (that way they don't have to coopt random keystrokes)
  • For packages with 1-character keystroke triggers, list that trigger in the menu
  • It seems a bit too complex for the stickyness of a mode to depend on how you got there (and there isn't all that much use for sticky help mode)
  • This is feature-y and we don't want more features (but this will be the last repl-mode keystroke we ever add so it's okay)
  • , is literally the only remaining non-shift character on a standard US keyboard that cannot start a line (aside from escape)

@LilithHafner LilithHafner removed the triage This should be discussed on a triage call label Jan 3, 2024
@sefffal
Copy link

sefffal commented Jan 3, 2024

Would escape (at the start of the line) be an option? It might be more discoverable, and the menu could even include an "exit" item. Those could really help beginners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs docs Documentation for this change is required needs news A NEWS entry is required for this change needs tests Unit tests are required for this change REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants