Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Cygwin New User Issue?
- X-seq: zsh-workers 27228
- From: Peter Stephenson <pws@xxxxxxx>
- To: "Zsh Hackers' List" <zsh-workers@xxxxxxxxxx>
- Subject: Re: Cygwin New User Issue?
- Date: Fri, 21 Aug 2009 15:26:37 +0100
- In-reply-to: <AC6F5002-C413-4AE7-9C9F-7C27AF4D3F1E@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <1B213508-B026-4632-8A06-B1D5FB1E2586@xxxxxxxxx> <20090817121133.427648cb@news01> <AC6F5002-C413-4AE7-9C9F-7C27AF4D3F1E@xxxxxxxxx>
On Wed, 19 Aug 2009 09:03:26 +0800
Aaron Davies <aaron.davies@xxxxxxxxx> wrote:
> Specific to cygwin, I should also note that the default install has no
> "clear" command included (they've packaged that with ncurses), so zsh-
> newuser-install also throws several "command not found: clear" errors.
This should cover most bases.
Index: Functions/Newuser/zsh-newuser-install
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Newuser/zsh-newuser-install,v
retrieving revision 1.7
diff -u -r1.7 zsh-newuser-install
--- Functions/Newuser/zsh-newuser-install 17 Aug 2009 11:15:38 -0000 1.7
+++ Functions/Newuser/zsh-newuser-install 21 Aug 2009 14:25:18 -0000
@@ -19,6 +19,15 @@
return 1
fi
+# clear is missing in some Cygwin configurations (lacking ncurses)
+if ! ( clear >/dev/null 2>/dev/null ); then
+ if zmodload zsh/termcap 2>/dev/null; then
+ clear() { echotc cl; }
+ else
+ clear() { print -n "\e[H\e[J"; }
+ fi
+fi
+
# The directory in which to look for and save .zshrc.
local zd=${ZDOTDIR:-$HOME}
# The same directory in a user friendly form, i.e. with ~ replacement.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
'member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author