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

Menu auto complete helper #511

Closed
jcubic opened this issue Aug 12, 2019 · 4 comments
Closed

Menu auto complete helper #511

jcubic opened this issue Aug 12, 2019 · 4 comments
Labels
feature resolved if issue is resolved, it will be open until merge with master

Comments

@jcubic
Copy link
Owner

jcubic commented Aug 12, 2019

I have idea for a new feature for jQuery Terminal

Add helper from https://codepen.io/jcubic/pen/MJyYEx to terminal file to simplify creating of auto complete menu:

it work the same as normal completion function or array, but call helper that wrap the options object:

$('body').terminal($.noop, $.terminal.menu_autocomplete({
  completion: function(string) {
      return fetch('completion.php', {string: string});
  }
});

consider API that allow the stacks of wrappers? How this should look like?

@jcubic
Copy link
Owner Author

jcubic commented Aug 12, 2019

Another potential experimental wrapper would be echo without newline, the code is hack but it can be put into external file.

@jcubic jcubic added the feature label Aug 12, 2019
jcubic added a commit that referenced this issue Aug 18, 2019
@jcubic
Copy link
Owner Author

jcubic commented Aug 18, 2019

I've decided that there will be no API for this, you just need to include the file and the code will do monkey patch.

@jcubic
Copy link
Owner Author

jcubic commented Aug 28, 2019

Echo newline file added it work the same as autocomplete_menu just need to include the file. The code also handle prompt as function. But still both files need some tests to be written.

jcubic added a commit that referenced this issue Aug 28, 2019
jcubic added a commit that referenced this issue Aug 28, 2019
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Aug 29, 2019
@jcubic
Copy link
Owner Author

jcubic commented Aug 29, 2019

released in 2.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

1 participant