0

In a LifeHacker article they the show how to add a handy little separator between commands (for bash and mac terminal). I am trying to get this to work using tcsh on a RHEL though have not been able to get it to work. I have been unable to get this working under tcsh. In the instructions, I need to modify the file .bashrc, so I am thinking I need to modify some other file, though I don't have a clue which one I should modify. Any help is greatly appreciated.

(http://lifehacker.com/5840450/add-a-handy-separator-between-commands-in-your-terminal-on-mac-os-x-and-linux)

Thanks and regards, Mark

1

In tcsh, you should edit .tcshrc. Note that you cannot use the tricks described in the article, because tcsh is too different. You can achieve similar effects with

set prompt=---------------------------------------------'%Y/%W/%D %T'\\n%C2%#

or

alias precmd 'echo -n --------------------------------- ; date "+%Y/%m/%d %H:%M:%S"'

I do not know how to do arithmetics in tcsh, so creating the line of the correct length is left as an exercise for the reader.

  • Thanks, choroba. That does work well. I will have to experiment with the various parameters. BTW: I tried to send the man page for the csh to a text file, but some of the text (looks like the items in bold) get messed up. Is there a way to send the man page to a text file so I can view is properly?? – lordhog Jul 25 '13 at 16:24
  • @lordhog: What's not proper on man? Try googling for man2txt or similar. – choroba Jul 25 '13 at 16:33
  • that should help. When I used man tcsh > tcsh-man.txt then when I tried to view it, it was additional characters which I assume are a result of the bold formatting of the man page. The man2txt should help me out, thanks. – lordhog Jul 25 '13 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.