Does FreeBSD /bin/sh use readline?

I am new to FreeBSD. I have it installed and working and am trying to adjust a few preferences. I have found that a few Control-key and Escape-key key sequences don't work as expected at the command prompt. I have read that some shells, such as bash, uses readline for reading and processing the command line. There is a man page in FreeBSD for readline. I have tried creating my own ~/.inputrc file and creating some custom key bindings, but they don't seem to be working. So, does sh use readline? (I'm guessing that because the man page for sh doesn't mention "readline" or "inputrc" that the answer is probably "no".)

Charles Bailey
 
No. Readline is a GNU project. FreeBSD base should not contain any GPL-licensed code.

If you want to know which libraries some native binary uses, try ldd(1). Here:
Code:
$ ldd /bin/sh
/bin/sh:
        libedit.so.8 => /lib/libedit.so.8 (0x3ec7916c1000)
        libc.so.7 => /lib/libc.so.7 (0x3ec793233000)
        libtinfow.so.9 => /lib/libtinfow.so.9 (0x3ec7945e8000)
        [vdso] (0x3ec790f3a000)

So you see, FreeBSD's /bin/sh uses Editline (libedit.so) instead.
 
Back
Top