[ ] Tuesday, 18 March 2014 [ ]

Hack #1

Getting the most of the default shell: although the hack is written for FreeBSD's tcsh. The sections

  • History and Auto-completion
  • Editing and Navigating the Command Line
apply to the default ksh shell found in OpenBSD. The last two sections need some investigation to work out how to achieve a similar result in ksh.
  • Learning from Your Command History
  • Silencing Auto-complete

history

By default the ksh shell found in OpenBSD doesn't set HISTFILE, thus history is lost on log out - which is useful security measure - as history files can record all sorts of useful information :~) [1] grep your history file for your password :~/

Added

HISTFILE=~/.sh_history
to my .kshrc file. I had tried
HISTFILE=~/.history.$( tty | sed 's;.*/;;')
which created files like
-rw-------   1 fred  staff        71 Mar 18 15:33 .history.ttyp8
but I decided this would create to many history files.


$Id: diary,v 1.38 2025/01/01 22:43:54 fred Exp $