ZSH completion for kdesrc-build

Ivan Čukić ivan.cukic at kde.org
Sat Jan 11 20:35:01 GMT 2014


You are evil :) Thank you dude!


On 11 January 2014 21:34, Ivan Čukić <ivan.cukic at gmail.com> wrote:

> You are evil :) Thank you dude!
>
>
> On 11 January 2014 17:04, Thiago Macieira <thiago at kde.org> wrote:
>
>> On sábado, 11 de janeiro de 2014 11:38:25, Ivan Čukić wrote:
>> > function _ksrccomp() {
>> >   reply=(`grep identifier kde_projects.xml | sed 's/^[^"]*"//' | sed
>> > 's/".*//' | sort -u`)
>> > }
>>
>> Replace the grep and two sed with just one sed:
>>
>>    reply=(`sed -n 's/.*identifier="\(.*\)".*/\1/p' kde_projects.xml |
>> sort -u`)
>>
>> You can also use zsh expansion modifiers "o" and "u" to sort and uniquify:
>>
>>     reply=(`sed -n 's/.*identifier="\(.*\)".*/\1/p' kde_projects.xml`)
>>     reply=(${(ou)reply})
>>
>> If you want to go further, you can replace the sed with a while read :-)
>>
>> --
>> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>>    Software Architect - Intel Open Source Technology Center
>>       PGP/GPG: 0x6EF45358; fingerprint:
>>       E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>>
>
>
>
> --
> While you were hanging yourself on someone else's words
> Dying to believe in what you heard
> I was staring straight into the shining sun
>



-- 
Cheerio,
Ivan

--
While you were hanging yourself on someone else's words
Dying to believe in what you heard
I was staring straight into the shining sun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20140111/49543de2/attachment.htm>


More information about the kde-core-devel mailing list