In message <[EMAIL PROTECTED]>, Ralf Wildenhues writes:
>> I enclose func_select below. Weaknesses:
>> 1. Newline after prompt. (Solving this portably seemed like too much work.)
>Grab the settings of ECHO_C, ECHO_N, ECHO_T from Autoconf, and use them.
ECHO_T? New on me.
I could probably do
* Peter Seebach wrote on Wed, Sep 17, 2008 at 08:07:19PM CEST:
>
> But you can implement a shell function such that
>
> while func_select var in args
> do
> done
>
> is equivalent (nearly) to
>
> select var in args
> do
> done
>
> I enclose func_select below. Weaknesses:
> 1. Newline after p
This came from a pair of sources; my work on portable shell, and the discovery
that glibc's tzselect "requires ksh".
Originally, I thought "there's no way you could implement select in a shell
which doesn't have it, because it's a control structure". And indeed, you
can't.
But you can implement