Dgdebug and rlwrap

I’ve been attempting to use rlwrap with dgdebug, to get input history and all that. So far, unsuccessfully. I’m not sure what dgdebug does internally in terms of user input (I haven’t checked).

I don’t know much about TTYs, but from skimming through the code, dgdebug disables canonical mode (presumably because it does a bit of its own line-editing, e.g. Ctrl-U, Ctrl-L). rlwrap detects this as “raw mode” and thus does nothing.

Using the -a, --always-readline option fixes this. The man page for rlwrap also suggests that -t dumb might be necessary, but it seems like this isn’t needed for dgdebug.

Dgdebug handles line editing on its own, using vt100 escape sequences. But this includes input history, so all four cursor keys should work as expected. Otherwise there might be a bug. What platform are you using?

Did you mean persistent input history? I could add support for it.

Meanwhile, a hack could be to pipe the input through cat, something like rlwrap sh -c 'cat | dgdebug ...'.