On 13/11/2020 09:33 am, felix wrote:
On Fri, Nov 13, 2020 at 12:19:27AM +0100, Léa Gris wrote:

Happy 10 years 10 months anniversary to the issue:

<https://lists.gnu.org/archive/html/bug-bash/2010-02/msg00074.html>

         address@hidden:~$ declare -c moo=moo; echo $moo
         Moo

   cap() { local -ca _cap=("$@");echo ${_cap[*]};}
   cap great éric.
   Great Éric.

Like this:
   https://lists.gnu.org/archive/html/bug-bash/2010-02/msg00081.html

   ${parameter:~pattern}  Toggle case of 1st character if matching optional 
pattern
   ${parameter:~~pattern} Toggle case of all characters regarding pattern:

   cap() { local -cl _cap=("$@");echo ${_cap[*]~};}
   cap great éric.
   Great Éric.

   myvar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; echo 
${myvar~~[H-p]}
   ABCDEFGhijklmnopqrstuvwxyzABCDEFGHIJKLMNOPqrstuvwxyz



But ${var^} still doesn't know that it should apply to the first alpha character in a string. Similar for , and ~. If the first character of the string is a punctuation character, e.g.(, it doesn't work (as I would like it to <g>).

--
Chris Elvidge
England


Reply via email to