LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   tcsh history display format (https://www.linuxquestions.org/questions/linux-software-2/tcsh-history-display-format-103274/)

k4zau 10-12-2003 10:33 PM

tcsh history display format
 
I have been trying to make tcsh change its default history display format. Say, for history event 5, vi, executed at 10:00pm on 10/12/03 it would show this:

5 12-Oct-03 22:00 vi

I want it to display something like that. I saw it on another box using tcsh. Many, many sources (including tcsh manpage) say that you can change the history display format with the same codes you use to change the prompt, like this:

set history=500 "%h %D-%w-%Y %T %R\n" savehist=500 merge

I was able to get the prompt I wanted. And I got the shell to save history to ~/.history also. But the above line in .tcshrc prevents me from accessing saved history, and gives the message:

set: Variable name must begin with a letter.

when I login. Am I not supposed to put quotes around the code, or use brackets or something? The manpage says the code is supposed to be the 'optional second word.' Am I supposed to put a character in front of it?

k4zau 10-12-2003 10:42 PM

d'oh

5 minutes after I post, I figure it out.
I need to put set history=(500 "%h %D-%w-%Y %T %R\n") savehist=(500 merge)

sorry to bother you :)


All times are GMT -5. The time now is 06:43 AM.