I dig around the code. And there was such comment before
the judgement if to show “> "

    /*
      Ignore prompts wider than the screen - only print a two
      character placeholder...

      It would be cool to truncate the prompt, but because it can
      contain escape sequences, this is harder than you'd think.
    */

I’d like an example how the “escape sequence” breaks the wrapping,
and also I can check how bash/zsh handle it.

I tried to remove the “> “ code and it seems working fine.
I say, if the user has really crazy stuff to reach the right end of
the prompt, he should take care of the crappy situation. I believe
for most users, that’s not the case. (Or am I being naive?)

At least, I’m thankful if (at least) there can be a variable to
control it. no replacement to “> “ should be the default.

-- 
BR,
Tony Wang

On June 17, 2013 at 15:18:23, ridiculous_fish (corydo...@ridiculousfish.com) 
wrote:

Hi Tony,  

fish does not attempt to wrap or truncate long prompts. Prompts often contain 
ANSI escape sequences, which make them difficult to wrap or truncate.  

What you can do is inspect the value of $COLUMNS in your fish_prompt, and avoid 
outputting one that is too long. If you have any other ideas or suggestions for 
what fish should do here, I'd love to hear them.  

Thanks,  
_fish  

On Jun 15, 2013, at 8:04 AM, Tony Wang <www...@gmail.com> wrote:  

> Hi,  
>  
> I’ve noticed that if the prompt is very long,  
> (longer than the window width), it’ll become  
> a single ‘>’, and it even won’t show a second  
> line.  
>  
> What’s the consideration behind it?  
> I don’t think it’s friendly to users.  
> I tried to google, but found nothing.  
>  
> Is there any configuration to change that?  
> Or, can I check if it happens, so I can try to  
> show something abbreviated instead?  
>  
> Thanks! :)  
>  
> --  
> BR,  
> Tony Wang  
>  
> ------------------------------------------------------------------------------
>   
> This SF.net email is sponsored by Windows:  
>  
> Build for Windows Store.  
>  
> http://p.sf.net/sfu/windows-dev2dev  
> _______________________________________________  
> Fish-users mailing list  
> Fish-users@lists.sourceforge.net  
> https://lists.sourceforge.net/lists/listinfo/fish-users

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to