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:references
	:mime-version:content-type:content-transfer-encoding; q=dns; s=
	default; b=vXQ8Q6WH30IpWHILxi3ZfLONSzRzzIeqgmIEc9DNJt4uwKQUaw5rU
	kah2I6L74yIgjy1a45SarcTgb9D8LtkPLSg4GiCsUiy5azhqd8OkhpNAk59uNfaZ
	c2IQM0gibZSoM2sPu1LOAEc4nupXvSVIMpoVYEvGm2l4//+dtdn6t8=
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:references
	:mime-version:content-type:content-transfer-encoding; s=default;
	 bh=gTS1DSRxoS4sA2qJXTG7xmz6X7I=; b=yhSF6yAiFMyu2W0+YQaBt99sPW6w
	fQJm8UOMW2xoKoxWaFSO9XYGXTBVifxsB/c1t3QvwbdddHiPFFi95hfPTLEDqdZ3
	pMU80V1CfY5NnXVlg3iesfMyJuBI1kKwcB1ofCoVvI20eWLbUINfyFPLoqVdlCWs
	IubsAOpimUa3KQ8=
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=-0.6 required=5.0 tests=AWL,BAYES_50,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: Re: fish prompt oddity
Date: Thu, 09 Oct 2014 06:30:50 -0400
Lines: 37
Message-ID: <7fkc3ad8dd45spsni9drdlfqissj1860tp@4ax.com>
References: <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 ~>
> ===

For the archive, I worked around this problem by solving it a different way.  Instead
of changing the fish_prompt function, I defined a fish_prompt event handler to print
the extra blank line:

function fish_prompt_handler --on-event fish_prompt
    echo
end

This gives me the blank line before each prompt, and for whatever reason it doesn't
interfere with syntax highlighting as I type.

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

