This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: fish prompt oddity
- From: Andrew Schulman <schulman dot andrew at epa dot gov>
- To: cygwin at cygwin dot com
- Date: Thu, 09 Oct 2014 06:30:50 -0400
- Subject: Re: fish prompt oddity
- Authentication-results: sourceware.org; auth=none
- References: <c40a3altm1ohh1ufnd9m22kegqlnaf2b6o at 4ax dot com>
> 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