0

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

| |
  • 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
0

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
| |
  • Should I add this into .zshrc or .bashrc – alper Oct 16 at 17:48

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.