Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)

2020-12-08 Thread Andreas Schwab
On Dez 07 2020, Testing Purposes wrote: > From an integer standpoint, I know that 08 (with one leading zero) is the > same as 8. Nope, it is a syntax error. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for

Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE

2020-12-08 Thread Chris Elvidge
On 08/12/2020 01:02 am, L A Walsh wrote: If I type in ( + are keypresses) if [[ '' == $'\t' ]]; then echo ok; else echo notok; fi bash displays: if [[ ' ' == $'\t' ]]; then echo ok; else echo notok; fi ok if I now copy the 'if' line and paste it if [[ ' ' == $'\t' ]]; then echo ok; else

Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE

2020-12-08 Thread Andreas Schwab
Just use history or fc -l to display the line as is. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE

2020-12-08 Thread pepa65
On 08/12/2020 19.55, Greg Wooledge wrote: > Some terminals, when fed a tab character, will preserve that knowledge > in memory; then, when you copy text from that part of the terminal > window using your mouse, the terminal will put a tab byte into the > selection/clipboard. Interesting! Which

Re: Bash-5.1 release available

2020-12-08 Thread Benno Schulenberg
Op 07-12-2020 om 20:39 schreef Chet Ramey: > On 12/7/20 1:47 PM, Benno Schulenberg wrote: >> It would be nice if the Translation Project would get a CC for >> the rc1 or rc2 release of bash, not for the final release. > > I copied coordina...@translationproject.org for > > bash-5.1-alpha  17

Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE

2020-12-08 Thread Greg Wooledge
On Mon, Dec 07, 2020 at 05:02:35PM -0800, L A Walsh wrote: > If I type in ( + are keypresses) > > if [[ '' == $'\t' ]]; then echo ok; else echo notok; fi > > bash displays: > > if [[ ' ' == $'\t' ]]; then echo ok; else echo notok; fi > ok Bash doesn't "display" things. Your terminal

Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE

2020-12-08 Thread felix
On Tue, Dec 08, 2020 at 08:07:18PM +0700, pepa65 wrote: > On 08/12/2020 19.55, Greg Wooledge wrote: > > Some terminals, when fed a tab character, will preserve that knowledge > > in memory; then, when you copy text from that part of the terminal > > window using your mouse, the terminal will put a

Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE

2020-12-08 Thread Greg Wooledge
On Tue, Dec 08, 2020 at 09:07:33AM -0500, Chet Ramey wrote: > On 12/7/20 8:02 PM, L A Walsh wrote: > > > The problem is that bash isn't displaying a 'tab' character where > > one was typed. > > It's readline and redisplay. Readline expands tabs to spaces using an > internal tab stop of 8. This

Re: Bash-5.1 release available

2020-12-08 Thread Benno Schulenberg
Op 08-12-2020 om 15:12 schreef Chet Ramey: > On 12/8/20 6:18 AM, Benno Schulenberg wrote: >> Yes, but for translators that is too far back -- too much time passes >> before the actual release happens. > > That doesn't make any sense. If there are any changed strings, the > translators should

Re: [EXT] Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)

2020-12-08 Thread Greg Wooledge
On Tue, Dec 08, 2020 at 09:47:05AM +0100, Andreas Schwab wrote: > On Dez 07 2020, Testing Purposes wrote: > > > From an integer standpoint, I know that 08 (with one leading zero) is the > > same as 8. > > Nope, it is a syntax error. In a bash math context or in C, 08 is indeed a syntax error,

Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE

2020-12-08 Thread Chet Ramey
On 12/7/20 8:02 PM, L A Walsh wrote: The problem is that bash isn't displaying a 'tab' character where one was typed. It's readline and redisplay. Readline expands tabs to spaces using an internal tab stop of 8. This allows it to be sure of the physical cursor location, especially when

Re: [EXT] Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)

2020-12-08 Thread Andreas Schwab
On Dez 08 2020, Greg Wooledge wrote: > On Tue, Dec 08, 2020 at 09:47:05AM +0100, Andreas Schwab wrote: >> On Dez 07 2020, Testing Purposes wrote: >> >> > From an integer standpoint, I know that 08 (with one leading zero) is the >> > same as 8. >> >> Nope, it is a syntax error. > > In a bash

Re: Bash-5.1 release available

2020-12-08 Thread Chet Ramey
On 12/8/20 6:18 AM, Benno Schulenberg wrote: Op 07-12-2020 om 20:39 schreef Chet Ramey: On 12/7/20 1:47 PM, Benno Schulenberg wrote: It would be nice if the Translation Project would get a CC for the rc1 or rc2 release of bash, not for the final release. I copied

Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)

2020-12-08 Thread Lawrence Velázquez
> On Dec 8, 2020, at 3:52 PM, Testing Purposes > wrote: > > FINAL THOUGHT — BASH FEATURE SUGGESTION: > > At the moment, this external command line reveals the version of Readline > that Bash is using: > > gdb bash -batch -ex 'printf "%04x\n", (int) rl_readline_version' > > Given how utterly

Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)

2020-12-08 Thread Testing Purposes
FINAL THOUGHT — BASH FEATURE SUGGESTION: At the moment, this external command line reveals the version of Readline that Bash is using: gdb bash -batch -ex 'printf "%04x\n", (int) rl_readline_version' Given how utterly fundamental Readline is to the functioning of Bash, perhaps it should become

Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)

2020-12-08 Thread Testing Purposes
On Tue, Dec 8, 2020 at 6:33 PM Lawrence Velázquez wrote: > > On Dec 8, 2020, at 3:52 PM, Testing Purposes < > raspberry.teststr...@gmail.com> wrote: > > > > --- > > bash --readline-version > > This instance of GNU Bash is using the GNU Readline library, version 8.1 > >

Re: bash doesn't display user-typed characters; can interfere with COPY/PASTE

2020-12-08 Thread L A Walsh
On 2020/12/08 06:28, Greg Wooledge wrote: The end result is that it's basically impossible to preserve the original whitespace of your source material across a terminal copy/paste operation. So don't count on that. If you use a random terminal to copy/paste, sure, but if you use a

Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)

2020-12-08 Thread Chet Ramey
On 12/8/20 6:32 PM, Lawrence Velázquez wrote: Such information could just be added to the output of bash --version (or perhaps as a shell variable à la BASH_VERSION). There is no need for a separate command-line option. Why, though? What is valuable about knowing which version of readline is