NetBSD/amd64 9.1. root's shell is /bin/sh. What do I have to do to arrange that "set -o emacs" is in effect when I su? I'm would expect I just need to drop the right incantation into the right file, but so far I have failed to discover the magic formula. I've been limping along manually typing set -o emacs each time, but that is...less than satisfactory.
I experimented with various things that looked like shell startup files; after complete failure, I did a ktrace experiment. Based on that, it appears sh never even tries to look for any startup files anywhere. I used a root shell to ktrace -i -d my normal-user shell (so the ktrace wouldn't be shut off by setuid) and then tried to su. According to kdump, after the point where su execs sh, the only NAMI records are 419 1 sh NAMI "/etc/ld.so.conf" 419 1 sh NAMI "/lib/libedit.so.3" 419 1 sh NAMI "/lib/libterminfo.so.1" 419 1 sh NAMI "/lib/libc.so.12" 419 1 sh NAMI "/etc/malloc.conf" 419 1 sh NAMI "/var/mail/mouse" 419 1 sh NAMI "." 419 1 sh NAMI "/home/mouse" 419 1 sh NAMI "/dev/tty" 419 1 sh NAMI "/var/mail/mouse" This is enough to convince me it's correctly continuing ktracing, but I sure don't see anything that looks like a shell startup file in there. Did I do something wrong in the install or what? Surely it's not *supposed* to be this difficult. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B