Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
else
  setenv TERM $TERM-256color
endif

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
add comment

1 Answer 1

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
else
  setenv TERM $TERM-256color
endif
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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