zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: "Zsh Hackers' List" <zsh-workers@sunsite.dk>
Subject: Re: Cygwin New User Issue?
Date: Fri, 21 Aug 2009 15:26:37 +0100	[thread overview]
Message-ID: <20090821152637.648a8851@news01> (raw)
In-Reply-To: <AC6F5002-C413-4AE7-9C9F-7C27AF4D3F1E@gmail.com>

On Wed, 19 Aug 2009 09:03:26 +0800
Aaron Davies <aaron.davies@gmail.com> 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@csr.com>            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'


      reply	other threads:[~2009-08-21 14:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1B213508-B026-4632-8A06-B1D5FB1E2586@gmail.com>
2009-08-17 11:11 ` Peter Stephenson
2009-08-19  1:03   ` Aaron Davies
2009-08-21 14:26     ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090821152637.648a8851@news01 \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).