Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ZSH on Dos/Windows (long)



Having a few free minutes and a much larger disk recently installed
on my Windows box, I decided to fiddle with Cygwin a bit.

Aside:  The cygwin installer created C:\{bin,usr,lib}\ even though I
told it to use C:\Cygwin\ as root.  Those directories are all empty;
the installed files went correctly into C:\Cygwin\{bin,usr,lib,etc}\

First thing I noticed is that many of the zsh functions (in $fpath)
don't get very far if you haven't installed the fileutils and sh-utils
packages.  So I went back and installed them.

I also installed termcap and terminfo, (lack of) which may have some
bearing on the problems Luciano is having.

Second thing I noticed is that the PATH is not set up correctly if you
start zsh directly (as opposed to starting bash first and then running
zsh from there).  This is the fault of whoever built the zsh package
for cygwin, not of zsh itself.

Third thing: as usual, bash exports PS1, so the prompt looks stupid if
you start zsh from bash.

Fourth: Colored prompts work fine.  I did
	autoload -U promptinit
	promptinit
	prompt -p
and the only prompts that didn't display properly are the ones that need
perl to compute some of their components.  I'm now using "prompt bart"
(how surprising).

This makes me wonder how Luciano is starting up zsh.

Fifth: zkbd doesn't work, because "read -t" doesn't work and because each
new "read -k" discards typeahead.  I hacked it a bit (leaving it unusable
for anyone who doesn't know what I did, so I'm not going to post it) and
used it to generate the appended file.

It appears from Thorsten's message that there may be different sequences
when the shift or control keys are pressed, because I don't know what
generates e.g. "^[Od" (which Thorsten bound to backward-word).

Sixth:  The command `: **/*' from /cygdrive/c did indeed take several
minutes ... long enough that I went to do something else and didn't
notice exactly how long.

---- 8< ---- $HOME/.zkbd/cygwin-pc-cygwin ---- 8< ----
typeset -g -A key

key[F1]='^[[[A'
key[F2]='^[[[B'
key[F3]='^[[[C'
key[F4]='^[[[D'
key[F5]='^[[[E'
key[F6]='^[[17'
key[F7]='^[[18'
key[F8]='^[[19'
key[F9]='^[[20'
key[F10]='^[[21'
key[F11]='^[[23'
key[F12]='^[[24'
key[Backspace]='^H'
key[Insert]='^[[2~'
key[Home]='^[[1~'
key[PageUp]='^[[5~'
key[Delete]='^[[3~'
key[End]='^[[4~'
key[PageDown]='^[[6~'
key[Up]='^[[A'
key[Left]='^[[D'
key[Down]='^[[B'
key[Right]='^[[C'

bindkey "$key[Delete]" delete-char
bindkey "$key[Home]" beginning-of-line
bindkey "$key[End]" end-of-line
---- 8< ---- snip ---- 8< ----



Messages sorted by: Reverse Date, Date, Thread, Author