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

2020-12-09 Thread Chet Ramey
On 12/9/20 3:55 PM, Testing Purposes wrote: In Appendix A of the official Bash manual, it says that "suggestions and ‘philosophical’ bug reports" are requested — so please bear with me while I get a bit philosophical about the experience that led to this thread. Sure. - MY EXPE

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

2020-12-09 Thread Testing Purposes
On Tue, Dec 8, 2020 at 8:49 PM Chet Ramey wrote: > 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, tho

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

2020-12-09 Thread L A Walsh
On 2020/12/08 04:40, 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 ma

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 l

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 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 f

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 a

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 math

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, as

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 s

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

2020-12-07 Thread Testing Purposes
On Tue, Dec 8, 2020 at 1:35 AM Eastern Time, Koichi Murase wrote: > Because the information on the literal format used in the source code > is lost in the executable `bash', you need to explicitly specify the > format `0xMMmm' (i.e. %04x) to gdb like this: > > (gdb) printf "%04x\n", (int) rl_read

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

2020-12-07 Thread Koichi Murase
2020年12月8日(火) 10:04 Testing Purposes : > Description: > > I just built Bash 5.1 [...], I ran "gdb bash" and entered > "print /x (int) rl_readline_version". I get "0x801" as the output. > If I do the same thing with Bash 5.0, I get "0x800". > > However, readline's online documentation at >

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

2020-12-07 Thread Clark Wang
On Tue, Dec 8, 2020 at 12:36 PM Testing Purposes < raspberry.teststr...@gmail.com> wrote: > But Readline's official documentation specifically chose an example with a > leading zero — 0x0402. It says that Readline 4.2 should have a version > value of 0x0402, not 0x402. > Could you point me to wh

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

2020-12-07 Thread Testing Purposes
On Mon, Dec 7, 2020 at 9:30 PM Eastern Time, Clark Wang wrote: The integer 0x801 is the same as 0x0801. > > # echo $(( 0x801 )) > 2049 > # echo $(( 0x0801 )) > 2049 > # echo $(( 0x0801 )) > 2049 > # > >From an integer standpoint, I know that 08 (with one leading zero) is the same as 8. But

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

2020-12-07 Thread Clark Wang
On Tue, Dec 8, 2020 at 10:04 AM Testing Purposes < raspberry.teststr...@gmail.com> wrote: > -- > readline.h defines a C preprocessor variable that should be treated as an > integer, As it says it's an integer. > RL_READLINE_VERSION, which may be used to conditionally compile > applicat

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

2020-12-07 Thread Testing Purposes
Configuration Information [Automatically generated, do not change]: Machine: aarch64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security uname output: Linux raspberrypi 5.4.72-v8+ #1356 SMP PREEMPT Thu Oct 22 13:58:52 BST 2020 aarch64 G$ Machine Type: aarch6