Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: another compctl question



On Jun 21, 12:18pm, Adam R. Paul wrote:
} Subject: another compctl question
}
} compctl -k ("`scoadmin -t | tr '[A-Z]' '[a-z]' | \
}             awk '{printf(\"\\"%s\\" \",
} $0}'`") scoadmin

Try this; I don't actually have scoadmin to try it:

    compctl -k "(${(L@)$(scoadmin -t):gs/ /\\\ /})" scoadmin

Aside to zsh-workers:

If (L) is the flag to lowercase a parameter expansion, shouldn't (:L) work
as a modifier, too?  (I know there's (:l), but consistency would be nice.)
Similarly for (U) and (:U).

Aside, part 2:

It would be nice if there were a specific error message for an unrecognized
modifier, rather than just "closing brace expected".

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"




Messages sorted by: Reverse Date, Date, Thread, Author