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

Re: ZSH on Dos/Windows (long)



* Luciano ES (03-04-06 17:48 +0100)
>> Who said something about a "full install", hm? Trust uncle Thorsten - 
>> if all you want is zsh, you just have to install zsh (1.3 MB) and 
>> cygwin itself (1.1 MB). Oops, I forgot - you'd have to download 
>> "setup.exe" (180 KB).
> 
> 	OK, now you actually sound helpful...

Pardon me for not being useful in the first place.

> 	That Cygwin "setup" (I hadn't used it in three years - time goes by really
> fast) offers loads of Unix libraries, but I don't see a cygwin "program" in
> that "way-narrower-than-my-screen-certainly-could-have-allowed-it-to-be"
> setup select dialog. Or are you talking about the famous cygwin1.dll?

I am talking about "cygwin: The UNIX emulation engine" in the "Base" 
category in "Select packages".
 
> 	When I run that 3.05 port of ZSH to Windows, you won't believe what
> happens when I press the Home key. The cursor jumps to the beginning of the
> line!!!! Have you ever seen that? And the best part: when I press the End
> key, it jumps to the end!! Amazing!!!!

,--- * http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html
| People often complain 'my backspace key does not work', as if this key
| had  a  built-in  function 'delete previous character'. Unfortunately,
| all  this  key, or any key, does is producing a code, and one only can
| hope  that  the  kernel tty driver and all application programs can be
| configured  such  that  the  backspace  key  indeed does function as a
| 'delete previous character' key.
`---

> I discovered, though, that ZSH is supposed to be able to listen to a key
> press and actually execute another. So I spent another hour reading the
> same chapter over and over and trying to make ZSH convert the Delete key
> into... the Delete command! No success. I press Delete and get tildes.

bindkey "\e[3~" delete-char

> Colors didn't work either. They work in Bash, but not in ZSH. I followed the
> manual instructions, but trying to colorize a prompt never worked, I get
> the color formatting sequences in my prompt instead of actual colors.

The colours are more beautiful in Cygwin rxvt than in the standard 
Console window but they do "work".

> Is anyone in the list using color prompts in Cygwin and would you be so kind
> to share your prompts with me?

PS1='%n@%m%{'$'\e[1;36m%}%#%{'$'\e[m%} '
RPROMPT='%{'$'\e[1;34m%}%~%{'$'\e[m%} %h:%i'

> More importantly, can anyone make Home, Delete and accented characters work
> with ZSH and Cygwin?

,---
| ## BEGIN KEY BINDINGS
| # !?command <TAB>  complete from history  # Bang-history
| # !#        <TAB>  repeat command line
| #
| # ^A   beginning-of-line, ^E end-of-line
| # ^D   list completions, log out
| # ^K   kill-line, ^U kill-whole-line
| # ^R   history-incremental-search-backward, ^[P history-search-backward
| # ^W   backward-kill-word, ^[D kill-word
| # ^XU  undo, ^X^U undo
| #
| # ^[.  insert-last-word
| # ^[B  backward-word, ^[F forward-word
| # ^[H  run-help
| # ^[Q  push-line
| 
| bindkey "^Z"    accept-and-hold
| bindkey " "     magic-space  # also do history expansion on space
| bindkey "\e[3~" delete-char
| bindkey "\e[A"  up-line-or-search
| bindkey "\e[B"  down-line-or-search
| 
| ## Thorsten's own bindings
| ## rxvt
| # These are the same as below - captured with [Ctrl]+[V]
| #bindkey "^[Od"  backward-word
| #bindkey "^[[7~" beginning-of-line
| #bindkey "^[[8~" end-of-line
| #bindkey "^[Oc"  forward-word
| 
| # captured with "od -c"
| bindkey "\eOd"  backward-word
| bindkey "\e[7~" beginning-of-line
| bindkey "\e[8~" end-of-line
| bindkey "\eOc"  forward-word
| 
| ## Cygwin Console
| # Cygwin Console does not distinguish between [Ctrl]+[<|] and [<|]
| # respectively [Ctrl]+[|>] and [|>]
| if   [ "$TERM" = cygwin ]
| then bindkey "\e[1~" beginning-of-line
|      bindkey "\e[4~" end-of-line
| fi
| ## END KEY BINDINGS
`---

> 	And here is an interesting experiment, probably a "bug" report you don't
> see every day...
> 	The native Windows Find utility is a little slow. It may take you almost a
> minute to scan a large drive and find all files that match your query. So I
> used the idea of indexing and built an indexing system.

Use "locate" with "updatedb": "list files in databases that match a 
pattern"


Thorsten
-- 
 Content-Type: text/explicit; charset=ISO-8859-666 (Parental Advisory)
 Content-Transfer-Warning: message contains innuendos not suited for
 children under the age of 18



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