X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:mime-version
	:content-type:content-transfer-encoding; q=dns; s=default; b=rXA
	OwiVytsrei3XCDyG19G594rCT1WRJHYJrGCJTIqD+0tVLeWqkH3sdvZMvXGKAyg7
	9Ns1DAuw/KsvzGOmqVg4Lvs6mK8dyBtk9AIbXOKqOmP2Nbg0w5uNLB9SNOQmqfhy
	ZwjGs84k6xY/Asnr2gzBwNmUscmj+xMGm19/pkuc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:mime-version
	:content-type:content-transfer-encoding; s=default; bh=/Y0wYAZAZ
	blOBhqgst+2B0zIUmc=; b=IqNyPCszhEJGPRZr1udNKeETP1eExLBYDxHVMrNiT
	ADMJvVK4UVRn5tYgiAmXRU8yiR45GEZSjoAvxJaB2Y0otciiZ4JT+y4hNi+zH/45
	Xii3LVca0XM5TBWdNgYLgQ2KBFnvribzZGaCG+JfRqT2X/RtMEQbeSWZEtABMt06
	as=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: plane.gmane.org
To: cygwin@cygwin.com
From: Andrew Schulman <schulman.andrew@epa.gov>
Subject: fish prompt oddity
Date: Wed, 08 Oct 2014 05:36:25 -0400
Lines: 38
Message-ID: <c40a3altm1ohh1ufnd9m22kegqlnaf2b6o@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Archive: encrypt
X-IsSubscribed: yes

In fish, I like to set the prompt to print a blank line before the prompt text.  No
problem:  I just add an "echo" statement at the beginning of the fish_prompt
function.  In fish in Linux that works fine:

===
andrex@helium ~> pwd
/home/andrex
 andrex@helium ~> 
===

But in Cygwin, it has a strange effect.  It seems that the prompt gets reprinted
every time the syntax highlighting changes, so I get a bunch of extra lines printed
as I type.  Here's how the same pwd command looks in my Cygwin fish console:

===
andrex@selenium ~>
andrex@selenium ~> pwd
andrex@selenium ~> pwd
andrex@selenium ~> pwd
/home/andrex

andrex@selenium ~>
===

I've tried working around this problem by adding

  if test -z (commandline) ; echo ; end

to fish_prompt instead of just echo, so it won't reprint the blank line if a command
is being typed.  But it doesn't help.  Apparently the prompt is computed once and
stored, then reprinted on each syntax highlighting change, including the extra
newline.

Is this caused by a configuration setting in fish that can be changed?  Something
Cygwin-specific?

Thanks,
Andrew


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

