Kakhist: persist command history, history UI

When the kernel creates a new process, it reserves space in the memory map for the “aux area”, which contains information like the effective user and group IDs (see getauxval(3) as well as the command line and environment. The size of this area is platform-dependent, but if you have GNU xargs installed it will tell you:

$ echo | xargs --show-limits
Your environment variables take up 2228 bytes
POSIX upper limit on argument length (this system): 2092876
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2090648

On my Linux system, the maximum space available to command-line arguments and environment variables is 2,092,876 bytes, but on some systems could be as little as 4,096 bytes.

In particular, I believe macOS has a notably smaller aux area than Linux.