Hacker News new | past | comments | ask | show | jobs | submit login

Did they finally implemented command history in shell? Last time I used OpenBSD it was considered as possible attack vector.



OpenBSD has used pdksh as their sh(1)/ksh(1) implementation for over 18 years. It has supported command history since the beginning..

http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/...

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/ksh/history...


?

Command history is a property of the shell and pdksh supports it, it just isn't enabled if HISTFILE is unset (other shells use a default HISTFILE if it's unset).

Just `export HISTFILE=~/.sh_history` from your `.profile` and you're done.


Probably worth clarifying that even without histfile, each shell will keep its own history in memory. You can still run commands again by pressing the up arrow. Seems obvious, but people seem to have some funny notions about OpenBSD.


You're free to install whatever other shell you want.


The default shell (pdksh) supports command history, it just doesn't setup a default one, so if HISTFILE is undefined there's no command history. That's pdksh behaviour not specific to OpenBSD (aside from not creating a default HISTFILE on new user profiles).




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: