Generic shell and shell history API.