Re: Bash patches format

2018-06-02 Thread Matt Housh
On 5/30/2018 02:04, Marty E. Plummer wrote:
> On Wed, May 30, 2018 at 10:42:27AM +0800, Clark Wang wrote:
>> On Wed, May 30, 2018 at 8:25 AM, Marty E. Plummer 
>> wrote:
>>
 If people are willing to do the conversion between patch formats for
>>> their
 own purposes, more power to them. I don't see any compelling reason to
 change the format I use.

>>> Could I at least convince you to start doing -p1, if not unified?
>>>
>>
>> I think the cost is too high. All bash package maintainers on different
>> *nix systems will have to change accordingly.
>>
>> -clark
> Well how about this; we ask the downstreams. List taken from repology,
> hopefully these are still all active and accurate. So, to reiterate the
> original premise of this thread for the newly added, I suggest the
> following:
> 
> 1. Change the official upstream bash patch format to be -p1 applicable,
> as a number of major linux distros either convert the patches in their
> own source repo to -p1 (debian and its children, fedora and its children),
> or have to take an explicit deviation from their default patch
> application method (gentoo) in order to apply -p0 patches.
> 
> Optional:
> 2. Change the format of the patch from a context diff to a unified diff,
> for the following reasons:
> a. unified diffs are generally smaller than an equivalent context
> diff, while encoding the same information.
> *** a/lib/readline/history.c2015-12-28 13:50:31.0 -0500
> --- b/lib/readline/history.c2016-09-30 14:28:40.0 -0400
> ***
> *** 308,312 
>   {
> if (history_stifled && history_max_entries > 0)
> !   history_size = history_max_entries + 2;
> else
>   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> --- 310,316 
>   {
> if (history_stifled && history_max_entries > 0)
> !   history_size = (history_max_entries > 
> MAX_HISTORY_INITIAL_SIZE)
> !   ? MAX_HISTORY_INITIAL_SIZE
> !   : history_max_entries + 2;
> else
>   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> 
> --- a/lib/readline/history.c2015-12-28 13:50:31.0 -0500
> +++ b/lib/readline/history.c2016-09-30 14:28:40.0 -0400
> @@ -308,5 +310,7 @@
>   {
> if (history_stifled && history_max_entries > 0)
> -   history_size = history_max_entries + 2;
> +   history_size = (history_max_entries > 
> MAX_HISTORY_INITIAL_SIZE)
> +   ? MAX_HISTORY_INITIAL_SIZE
> +   : history_max_entries + 2;
> else
>   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> 
> b.  unified diffs are easier to size up at a glance than
> context diffs.
> 
> c.  unified diffs are the
> standard for a host of foss projects, especially those using git as a
> vcs solution as it produces context diffs by default and you have to
> purposely change it to do otherwise.
> 
> Maintainers, I'd really like to hear your thoughts on this matter. If
> the diffs are produced as -p1 unified diffs, then downstreams who do
> convert from -p0 context won't have to, and distros who work around it
> won't either.
> 
> Regards,
> 
> Marty
> 

Greetings,

Speaking for the CRUX maintainers, we don't have a preference. Whatever
works best for upstream.

Regards,
Matt


pEpkey.asc
Description: application/pgp-keys


suggestion for improvement - help pwd

2018-06-02 Thread jefgeni
Dear Sir or Madam,

I'd like to make a somewhat meticulous suggestion for improvement in the output 
of 'help pwd'.
On line 6, the word 'directory' is not properly indented.

System information:
Operating System: Ubuntu 16.04 LTS
Terminal: GNOME Terminal 3.18.3

Cheers,

Jefgeni

Re: suggestion for improvement - help pwd

2018-06-02 Thread Chet Ramey
On 6/2/18 2:19 PM, jefg...@protonmail.com wrote:
> Dear Sir or Madam,
> 
> I'd like to make a somewhat meticulous suggestion for improvement in the 
> output of 'help pwd'.
> On line 6, the word 'directory' is not properly indented.

It looks fine to me:

$ ./bash --version
GNU bash, version 4.4.23(7)-release (x86_64-apple-darwin15.6.0)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ ./bash -c 'help pwd'
pwd: pwd [-LP]
Print the name of the current working directory.

Options:
  -Lprint the value of $PWD if it names the current working
directory
  -Pprint the physical directory, without any symbolic links

By default, `pwd' behaves as if `-L' were specified.

Exit Status:
Returns 0 unless an invalid option is given or the current directory
cannot be read.



-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: suggestion for improvement - help pwd

2018-06-02 Thread David Margerison
On 3 June 2018 at 09:54, Chet Ramey  wrote:
> On 6/2/18 2:19 PM, jefg...@protonmail.com wrote:
>> Dear Sir or Madam,
>>
>> I'd like to make a somewhat meticulous suggestion for improvement in the 
>> output of 'help pwd'.
>> On line 6, the word 'directory' is not properly indented.
>
> It looks fine to me:

And it looks broken to me.

I tested on

$ echo $BASH_VERSION
4.3.30(1)-release

interactively, and then by running this command

$ help pwd >filename

Viewing the created file in an editor that makes tab and space
characters individually visible reveals that the line in question is
indented using a mixture of spaces and tabs.

Whereas every other line is indented by space characters only.

So in many situations, affected by font and tab-width settings,
the line 6 will therefore fail to match the indentation of the other lines.

It looks like if an extra four leading spaces were added to that line,
then it would correctly align always.

I hope this helps :)



Re: suggestion for improvement - help pwd

2018-06-02 Thread Chet Ramey
On 6/2/18 8:15 PM, David Margerison wrote:

> It looks like if an extra four leading spaces were added to that line,
> then it would correctly align always.
> 
> I hope this helps :)

Sure. Bash-4.3 is years old. I showed the current version.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/