Switching from tcsh/csh

The zsh distribution comes with the c2z tool that converts csh aliases and environment and shell variables to zsh. It does this by running csh, and having csh report on aliases and variables. The script then converts these to zsh startup files. It has some issues and usage information that are documented at the top of this script.

Also there is a script lete2ctl which will convert tcsh complete commands to zsh compctl commands. However, this converts only to the old completion system, so it is limited. This works ok, I had some problems with some advance stuff, but overall it worked ok. Hopefully, the latest zsh already has the completion functions that need. These scripts are not installed, you need to get them from the zsh source distribution in Misc/ directory. Or pull them from the web cvs tree in http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/zsh/zsh/Misc/

There was a thread in Apr/May 2006 on the zsh-users mailing list about the tcsh setting "set complete=enhance". Some solutions provided:

  • Look at matcher style, matching specs will help you figure out what you want.
  • One person suggested:
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z} m:[-._]=[-._] r:|[-./_]=** r:|=*' '+l:|=*'
  • For German, someone suggested:
zstyle ":completion:*" matcher-list 'm:{A-Zöäüa-zÖÄÜ}={a-zÖÄÜA-Zöäü}'
convert/tcsh.txt · Last modified: 2010/01/05 09:20 (external edit)