[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] read -ep and ANSI colour sequences
From: |
muji |
Subject: |
Re: [Help-bash] read -ep and ANSI colour sequences |
Date: |
Wed, 20 Feb 2013 14:06:41 +0100 |
Thanks for all the information folks.
I need to use readline with -e so that the arrow keys, completion etc.
work as expected.
I like using ctrl+w to delete a word and without readline (-e) then it
also deletes the prompt when using printf (for prompt ANSI sequences)
before calling read :(
The use case is an interactive shell program. FYI, I am using bash-4.2.
I like programs to appear aesthetically pleasing *and* work as
expected. It appears to me from my research into this and other issues
with command completion in interactive shell programs written in bash
that it's awkward to get this kind of complex behaviour.
I would of course be very happy to be corrected!
2013/2/20 Chris Down <address@hidden>:
> On 2013-02-20 13:44, Pierre Gaston wrote:
>> The problem appears when your answer reach the rightmost column of
>> your termina, it will wrap instead of going to the next line.
>> Try with and without colors in the prompt and type enough chars to
>> reach the end of the line and you will see.
>
> Yes, that's true. As far as I am aware there is no way around this using
> readline.
>
> If there is no reason to use readline, just omit `-e'. It should solve this
> problem (at least it does as far as I can tell).
>
> Chris
--
mischa (aka muji).
- [Help-bash] read -ep and ANSI colour sequences, muji, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Chris Down, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Chris F.A. Johnson, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Chris Down, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Pierre Gaston, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Chris Down, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Pierre Gaston, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Chris Down, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences,
muji <=
- Re: [Help-bash] read -ep and ANSI colour sequences, Greg Wooledge, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, muji, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Chris F.A. Johnson, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, muji, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Matthew Cengia, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Chris F.A. Johnson, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Chet Ramey, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Chet Ramey, 2013/02/20
- Re: [Help-bash] read -ep and ANSI colour sequences, Pierre Gaston, 2013/02/20
Re: [Help-bash] read -ep and ANSI colour sequences, Chet Ramey, 2013/02/20