[PATCH] tzselect.ksh: Use /bin/sh default shell interpreter

Paul Eggert eggert@cs.ucla.edu
Thu Dec 16 18:45:12 GMT 2021


On 12/16/21 10:25, Adhemerval Zanella wrote:
> I mean that a distribution that want to improve tzselect support
> would either patch it locally to use a better shell or make the
> default shell bash or a supported one.

If I understand you correctly, you're proposing to leave tzselect.ksh 
alone, and to put a comment and a configuration option in Makeconfig, 
and have that option be used to edit tzselect, and that the glibc 
default (in Makeconfig) to be /bin/sh rather than /bin/bash.

This would all work, except that the glibc default (in Makeconfig) 
should be /bin/bash not /bin/sh, for three reasons. First, this keeps 
the default the same as before and there is an advantage to not messing 
with things. Second, this makes it more likely for tzselect to use 
'select' which is significantly better user interface (see below). 
Third, the GNU C library should default to the GNU implementation of the 
shell.

> running tzselect with dash, the only layout difference seems
> that each option is placed in one line (different than bash that 
> place multiple options in one line). It is hard a deal breaker

No, using Bash is a significant user-visible improvement worth keeping. 
For example, under a Ubuntu terminal if I run 'tzselect' with bash and 
select the Americas, I get the first attached image. If I run it with 
dash I get the second. The bash-based tzselect is clear and easily 
usable, the dash-based tzselect is not.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2021-12-16 10-36-28.png
Type: image/png
Size: 104228 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20211216/9e1fb404/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2021-12-16 10-37-00.png
Type: image/png
Size: 61858 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20211216/9e1fb404/attachment-0003.png>


More information about the Libc-alpha mailing list