Re: Re: [PATCH 4/9] bashgetopt: define long option shortener function

2024-05-08 Thread Matheus Afonso Martins Moreira
> Backwards compatibility from the ancient past. Even back then (1989), > `type' was the only builtin that supported any kind of long option; > no other builtins ever have. I see, thanks for clarifying. I will remove the long options. -- Matheus

Re: [PATCH 4/9] bashgetopt: define long option shortener function

2024-05-08 Thread Chet Ramey
On 5/8/24 4:37 AM, Koichi Murase wrote: 2024年5月8日(水) 8:11 Matheus Afonso Martins Moreira : Some builtins do support long options, even though it seems to not be documented. I didn't know the `type' builtin recognizes those forms. Backwards compatibility from the ancient past. Even back then

Re: [PATCH 4/9] bashgetopt: define long option shortener function

2024-05-08 Thread Chet Ramey
On 5/7/24 7:11 PM, Matheus Afonso Martins Moreira wrote: If you consider the current form would be complete, you should provide the reason that the other builtins should not have the long form of the options, while only the source builtin should have a long option. I don't understand why they

Re: [PATCH 4/9] bashgetopt: define long option shortener function

2024-05-08 Thread Koichi Murase
2024年5月8日(水) 8:11 Matheus Afonso Martins Moreira : > Some builtins do support long options, even though it seems > to not be documented. I didn't know the `type' builtin recognizes those forms. > Also, I do realize that there's a big all caps warning > in the file saying that "THIS SHOULD REALLY

Re: [PATCH 4/9] bashgetopt: define long option shortener function

2024-05-07 Thread Matheus Afonso Martins Moreira
> It's simply inconsistent in the present form. Why should only the > source builtin have the long form of the option? No other builtins > have the long form of options, which is inconsistent. Some builtins do support long options, even though it seems to not be documented. In fact, I based the lo

Re: [PATCH 4/9] bashgetopt: define long option shortener function

2024-05-07 Thread Koichi Murase
2024年5月5日(日) 18:57 Matheus Afonso Martins Moreira : > Define the shorten_long_options helper function that converts Let's talk about whether we should support the long form of the option in this patch set. 2024年5月7日(火) 2:11 Matheus Afonso Martins Moreira : > > incomplete addition of the long opti

[PATCH 4/9] bashgetopt: define long option shortener function

2024-05-05 Thread Matheus Afonso Martins Moreira
Define the shorten_long_options helper function that converts long options to short options which are supported by bash's builting getopt function. Signed-off-by: Matheus Afonso Martins Moreira --- builtins/bashgetopt.c | 24 builtins/bashgetopt.h | 7 +++ 2 files c