On Mon, Sep 12, 2022 at 6:54 AM Peter Stephenson < p.w.stephenson@ntlworld.com> wrote: > > I tend to agree with Bart that a change like the above is probably best > in the long run. Directly using zsh's own features inline would be > clearer (given the core audience here is zsh experts anyway). I agree that a zsh-specific solution is best. FWIW, for clarity I would remove the 'langs' assignment entirely and put the entire construct on the 'for' statement: for LANG in en_{US,GB}.{UTF-,utf}8 en.UTF-8 ${(M)$(locale -a 2>/dev/null):#*.(utf8|UTF-8)} ; do