Re: Saving/Recalling Shell Commands History?
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Saving/Recalling Shell Commands History?         

Group: gnu.emacs.help · Group Profile
Author: Peter Dyballa
Date: Aug 21, 2006 13:09

Am 21.08.2006 um 17:07 schrieb gamename:
> Hi,
>
> Is there any way to save the commands issued in shell-mode and recall
> them when a new shell starts, or even in a new instance of emacs?
>

The documentation writes:

(defun comint-read-input-ring (&optional silent)
"Set the buffer's `comint-input-ring' from a history file.
The name of the file is given by the variable `comint-input-ring-
file-name'.
The history ring is of size `comint-input-ring-size', regardless of
file size.
If `comint-input-ring-file-name' is nil this function does nothing.

(defun comint-write-input-ring ()
"Writes the buffer's `comint-input-ring' to a history file.
The name of the file is given by the variable `comint-input-ring-
file-name'.
The original contents of the file are lost if `comint-input-ring' is
not empty.
If `comint-input-ring-file-name' is nil this function does nothing.

Although I have set comint-input-ring-file-name, this file never gets
written. And neither read (I've put some uniq commands into it to see
if). All *shell* does in my case, is it reads ~/.tcsh history –
because I have tcsh as login shell.

Could be there is bug, or I simply need to activate the described
behaviour with some start-up or shut-down hooks ...

--
Greetings

Pete

»¿ʇı̣ əsnqɐ ʇ,uɐɔ noʎ ɟı̣
ɓuı̣ɥʇʎuɐ sı̣ pooɓ ʇɐɥʍ«
no comments
diggit! del.icio.us! reddit!