Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,12 @@ private CharSequence readCommand(AtomicBoolean reading) throws UserInterruptExce
}
} catch (UserInterruptException e) {
command = ""; // Do nothing
} catch (StringIndexOutOfBoundsException e) {
// Workaround for JLine CompletionMatcherImpl bug: Tab on empty line triggers
// substring(0, 1) on "" in defaultMatchers() before EMPTY_WORD_OPTIONS check.
// Re-prompt instead of exiting the shell.
LOGGER.debug("Completion on empty line triggered known JLine edge case", e);
command = "";
} catch (Throwable t) {
ShellUtil.logException(this, t);
} finally {
Expand Down