Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command autocompletion working for aliases too. #75

Merged
merged 1 commit into from
Jan 9, 2016
Merged

command autocompletion working for aliases too. #75

merged 1 commit into from
Jan 9, 2016

Conversation

fiatjaf
Copy link
Contributor

@fiatjaf fiatjaf commented Jan 9, 2016

No description provided.

@dthree
Copy link
Owner

dthree commented Jan 9, 2016

Awesome - thanks! Would you be able to throw in test coverage for this?

@fiatjaf
Copy link
Contributor Author

fiatjaf commented Jan 9, 2016

There was no test for the previous autocomplete behavior, and I don't know how to test it.

@dthree
Copy link
Owner

dthree commented Jan 9, 2016

Oh shoot - yeah I remember testing auto-completion was tricky. Okay, fine for now. Thanks!

dthree added a commit that referenced this pull request Jan 9, 2016
command autocompletion working for aliases too.
@dthree dthree merged commit e7736ff into dthree:master Jan 9, 2016
@fiatjaf
Copy link
Contributor Author

fiatjaf commented Jan 9, 2016

came up with this:

describe('command execution', function () {
  vorpal.ui.input('donal');
  vorpal.ui._activePrompt.screen.rl.cursor = 5;
  vorpal.ui.emit('vorpal_ui_keypress', {key: 'tab'});
  vorpal.ui.input().should.equal('donald trump ');
});

but session.getAutocomplete's trimmed variable comes up as undefined and so no match is found. Where is the error? What is the correct way to set this cursor?

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.

None yet

2 participants