Trying to use sqlplus on solaris was proving to a pain do to the lack of command history. I found an oracle blog that described using rlwrap to work around this. A few other sites supported this, so I grabbed the source for rlwrap-0.41 and gave it a shot, a simple ./configure && make. When running I received an error.
% rlwrap sqlplus Warning: rlwrap cannot determine terminal mode of sqlplus (because: Invalid argument). Readline mode will always be on (as if -a option was set); passwords etc. *will* be echoed and saved in history list! rlwrap: error: TIOCSWINSZ failed on no pty: Bad file number
After googling around I found this github issue on a repo which has since fixed the problem. The issue is in pty.c So, I cloned the source, cd’d in and did a ./configure. However this repo didn’t have a configure. Granted it works with autoreconf, I’m working on a limited system where I have very little power. Rather than descend this building-everything-from-source dive any further, I replaced the pty.c in my existing version with the pty.c from the github repo and it seems to work fine.
Hacky? yes, but I’m not planning on spending a ton of time on this system.