delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/10/08/05:37:00

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT cygwin DOT com
From: Andrew Schulman <schulman DOT andrew AT epa DOT 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
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 AT helium ~> pwd
/home/andrex
 andrex AT 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 AT selenium ~>
andrex AT selenium ~> pwd
andrex AT selenium ~> pwd
andrex AT selenium ~> pwd
/home/andrex

andrex AT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019