Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently added the following (below) to .mycshrc to allow 256 color xterm and allow command line vim to operate in 256 colors, however certain command line tools like less have thrown errors xterm-256color-256color and I am unsure why this is happening or how to fix it.

Added to .mycshrc:

if ($TERM =~ {256color}) then
  #Already 256color
  setenv TERM $TERM-256color

The error:

$ less somefile
tcsh: No entry for terminal type "xterm-256color-256color"  
tcsh: using dumb terminal settings.

I am running : Red Hat Enterprise Linux Client release 5.7 (Tikanga)
Using tcsh : tcsh 6.14.00 (Astron) 2005-03-25 (x86_64-unknown-linux) options wide,nls,dl,al,kan,sm,rh,color,filec

share|improve this question
Are you sure about your test ($TERM =~ {256color}) ? It really looks like it added the suffix two times.. – Levans Aug 1 '13 at 12:51
@Levans my usage of the pattern matching was incorrect. – Munkymorgy Aug 2 '13 at 8:04
up vote 0 down vote accepted

Not sure why less and a few other command line programs source the '.mycshrc' a second time but the issue was my use of the csh string pattern matching =~.

It should have been:

if ($TERM =~ *256color*) then
  #Already 256color
  setenv TERM $TERM-256color
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .