What shell do you guys use? - BSD

Users browsing this thread: 1 Guest(s)
jkl
Long time nixers
Sadly, on macOS's Homebrew, rc comes without readline. I don't really want to install pkgsrc on this computer just to have that. I wonder if there is an easy fix.
seninha
Long time nixers
(27-03-2023, 06:35 PM)jkl Wrote: Sadly, on macOS's Homebrew, rc comes without readline. I don't really want to install pkgsrc on this computer just to have that. I wonder if there is an easy fix.
I can only think on two workarounds: call rc through rlwrap if you're running on a regular terminal, or use 9term and rely on its line editing system. The latter is the closest you get to plan9 regarding line editing on the shell.
jkl
Long time nixers
9term is a rather good idea which I did not have myself, thank you. :)
rlwrap would probably work too. I'll see what I can do with it...

edit:

Quote:rlwrap: warning: rlwrap appears to do nothing for rc, which asks for
single keypresses all the time. Don't you need --always-readline
and possibly --no-children? (cf. the rlwrap manpage)

Well... :)

edit: Had to use Git for the best option (namely, just use Byron's rc and enable readline (and the built-in history!) myself).

Code:
% git clone https://github.com/rakitzis/rc
% cd rc; autoreconf -i
% ./configure --with-edit=readline --with-history
% make ; sudo make install

Works. (If readline can't be found, setting LDFLAGS and CPPFLAGS to point to readline's /lib/ and /include/ folders fixes it.)

Finally, a sane shell again. I also used this opportunity to figure out how to make rc case-insensitive when compiled with readline:

Code:
# ~/.inputrc
set completion-ignore-case On

Good enough!