I'm trying to add the date to my tcsh history information and I can't seem to figure out how to make it work. The tcsh man page reads like this for the history setting:
The first word indicates the number of history events to save. The optional second word (+) indicates the format in which history is printed; if not given, `%h\t%T\t%R\n' is used. The format sequences are described below under prompt; note the variable meaning of
%R'. Set to
100' by default.
I've tried the following put a line in my .cshrc
file using what they say is the default format, but I get an error every time I source. Here is what I've tried (with the resulting error in brackets):
set history = 2000 '%h\t%T\t%R\n'
[set: Variable name must begin with a letter.]
set history = 2000 %h\t%T\t%R\n
[set: Variable name must begin with a letter.]
set history = 2000 $DATE='%h\t%T\t%R\n'
[DATE: Undefined variable.]
set history = 2000 $FORMAT='%h\t%T\t%R\n'
[FORMAT: Undefined variable.]
set history = 2000 $TIME='%h\t%T\t%R\n'
[TIME: Undefined variable.]
The following doesn't give me a source error, it gives me a history: Badly formed number.
error when I try to use history:
set history = '2000 %h\t%T\t%R\n'
I'm obviously just thrashing around here, I don't have a lot of experience with modifying the .cshrc
file. Any help would be appreciated.