Skip to content
This repository was archived by the owner on Nov 28, 2018. It is now read-only.

Commit 0f2ee06

Browse files
add "ctrl+u" to clear then entire current prompt.
1 parent a2bf49e commit 0f2ee06

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

jquery.console.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@
8484
// C-f
8585
70: moveForward,
8686
// C-k
87-
75: deleteUntilEnd
87+
75: deleteUntilEnd,
88+
// C-u
89+
85 : clearCurrentPrompt
8890
};
8991
if(config.ctrlCodes) {
9092
$.extend(ctrlCodes, config.ctrlCodes);
@@ -420,6 +422,10 @@
420422
updatePromptDisplay();
421423
}
422424
};
425+
426+
function clearCurrentPrompt() {
427+
extern.promptText("");
428+
};
423429

424430
function deleteNextWord() {
425431
// A word is defined within this context as a series of alphanumeric

0 commit comments

Comments
 (0)