Skip to content

Added UNIX-like Ctrl+U, Ctrl+K, Ctrl+A and Ctrl+E shortcuts - #69

Open
tomlandia wants to merge 1 commit into
replit-archive:masterfrom
tomlandia:master
Open

Added UNIX-like Ctrl+U, Ctrl+K, Ctrl+A and Ctrl+E shortcuts#69
tomlandia wants to merge 1 commit into
replit-archive:masterfrom
tomlandia:master

Conversation

@tomlandia

Copy link
Copy Markdown

No description provided.

@amasad

amasad commented Dec 26, 2014

Copy link
Copy Markdown
Contributor

Can't this be done using our jqconsole.RegisterShortcut API?

@tomlandia

Copy link
Copy Markdown
Author

Ah maybe, adding an arg to ClearPromptText. But why wouldn't these shortcuts be built-in just like Ctrl-Left and Ctrl-Right, and like in GNU Readline? I use several sites using jqconsole and wouldn't like to patch each one...

Comment thread src/jqconsole.coffee

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make this into options instead. You can use destructering to have a nice syntax in the method definition:

_Delete: ({whole_word, whole_line}) ->

And in the callsite:

_Delete(whole_word: true)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amasad

amasad commented Dec 30, 2014

Copy link
Copy Markdown
Contributor

I'm convinced :) Just a small comment then I'll pull it

@tomlandia

Copy link
Copy Markdown
Author

Uh do you want to switch to object parameter in this pull request or after pulling?

@amasad

amasad commented Jan 2, 2015

Copy link
Copy Markdown
Contributor

it'd be great if we did it in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants