Basic navigation

While navigational control inside the JShell is similar to most command-line editors, it is helpful to have a list of basic navigational controls:

Key/Key combination Navigation action
Left arrow Move backward one character
Right arrow Move forward one character
Up arrow Move up one line through history
Down arrow Move down one line forward through history
Return Enter (submit) the current line
Ctrl + A (cmd - A on Mac) Jump to the beginning of the current line
Ctrl + E (cmd - E on Mac) Jump to the end of the current line
Alt + B Jump back one word
Alt + F Jump forward one word

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.