Hacker News new | ask | show | jobs
by tomc1985 1651 days ago
I love FreeBSD, but the way it behaves with Home and End keys drives me nuts. Is there a way to set it to behave as Linux consistently, across all users, session, and jails?
1 comments

What is the problem exactly? I use FreeBSD (and Linux) for years and not aware that Home/End behave differently in FreeBSD. Default FreeBSD shell was until recently tcsh and it is a bit quirky but in tcsh Home/End work by default. sh is another shell from FreeBSD base system - it is small and simple but even there Home/End work with `set -o emacs` in .shrc (it is in default .shrc, from /usr/share/skel/).
So Home and End don't go to the start and end of line, respectively, when I hit those connected via a remote terminal (using PuTTY).

Seems to be universal to the entire OS, as I get this behavior in bash, vim, and pretty much everything else. I applied some kind of hack to make it work correctly in bash on the host OS, but it doesn't work correctly in vim or other programs, or anything in any jailed OS.

They do seem to work fine at a local console though, so I'm wondering if its my term emulation settings in PuTTY.

Yes, it likely related to how PuTTY emulates terminal or which TERM var it sends.