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

Re: [golf?] harvesting only the mached part of the matched files



On Mon, Apr 25, 2016 at 8:19 AM, Marc Chantreux <khatar@xxxxxxxxx> wrote:
>         k=()
>         : /dev/sg[0-9]##(one:'k+=${REPLY#/dev/sg}':)

Yours would be better as:
k=( /dev/sg<->(one:'reply=( ${REPLY#/dev/sg} )':) )

But this is probably shortest:
k=( /dev/sg<->(on:t:s/sg/) )



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