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

readline alternative #3

Open
4 tasks
bmatsuo opened this issue Jun 30, 2014 · 3 comments
Open
4 tasks

readline alternative #3

bmatsuo opened this issue Jun 30, 2014 · 3 comments

Comments

@bmatsuo
Copy link
Owner

bmatsuo commented Jun 30, 2014

Since readline won't work an alternative needs to be found. A pure Go library would be ideal. But decent C bindings with a reasonable license would be fine too. This thread should collect requirements and decide on an alternative package.

  • Left/Right arrow key support is the absolute minimum of what's needed.
  • History support (built in or hackable).
  • Auto complete support (built in or hackable). This could have varying degrees of awesomeness. Any would probably be preferable over none.
  • Reverse i-search support (built in or hackable).

Things like my vim ~/.inputrc bindings are probably a lot cause (nooooo!).

@bmatsuo bmatsuo changed the title readline (or equivalent) readline (or alternative) Jun 30, 2014
@bmatsuo bmatsuo added this to the 1.0 milestone Jun 30, 2014
@bmatsuo
Copy link
Owner Author

bmatsuo commented Jun 30, 2014

If someone wanted to help all they need to do is rewrite, or provide a new implementation of, the ShellReader interface which parses commands into string slices. It's pretty straight forward.

Ping me @bmatsuo before you start working on this so I can agree beforehand to the library you want to use and your plan.

@bmatsuo
Copy link
Owner Author

bmatsuo commented Jun 30, 2014

For now rlwrap seems to do a sufficient job with the proper options.

rlwrap -A -N jqsh

The rlwrap man page suggests that -N is Linux only (edit: a warning is also displayed on startup), but it seemed to help for me on OS X 10.9 Mavericks. /shrug

@bmatsuo
Copy link
Owner Author

bmatsuo commented Jul 14, 2014

I don't think readline proper is the right way to go. The utility needs to be statically linked IMO. That would mean including the readline source and making the license GNU GPL.

An interesting alternative may be code.google.com/p/go.crytpo/ssh/terminal. It is pretty low level, so probably best to look at the importers first.

edit: looks like no one has taken that package and tried to implement anything close to a reasonably featured readline replacement.

@bmatsuo bmatsuo changed the title readline (or alternative) readline alternative Jul 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant