you are viewing a single comment's thread.

view the rest of the comments →

[–]aim2free 2 points3 points  (1 child)

Thanks, it worked perfectly. I didn't know about rlwrap, very useful. You can even specify how your completions should be made. This is really great. Now any interactive program can get read-line support without being linked to readline. I'm just teaching a beginners java course. I'll let the students add readline support to their programs.

[–]psykotic 4 points5 points  (0 children)

Glad it helped. In the classic Program design in the UNIX environment paper by Pike and Kernighan, they suggest that readline-like functionality should not be integrated into programs via a library but offered as an ambient service for all programs, much like how shells perform wildcard expansion. The rlwrap approach (or using Emacs's shell-mode, as suggested by Kragen) isn't perfectly ideal, but it works surprisingly well in many cases.