* texexec completion script for zsh @ 2007-12-17 1:15 Aditya Mahajan 2007-12-18 17:18 ` Matija Šuklje 0 siblings, 1 reply; 4+ messages in thread From: Aditya Mahajan @ 2007-12-17 1:15 UTC (permalink / raw) To: mailing list for ConTeXt users Hi, I just put together a simple completion script for texexec in zsh. Zsh can do some fancy completions with tab. I have written a completion script that gives some command line switches of texexec as part of tab completion in zsh. Here is what the output looks like http://wiki.contextgarden.net/Image:Screenshot-Terminal.png One can go between the different options by pressing tab. The script is at http://wiki.contextgarden.net/User:Adityam#Zsh_completion This is my first attempt to write a zsh completion script. Any feedback is welcome. Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: texexec completion script for zsh 2007-12-17 1:15 texexec completion script for zsh Aditya Mahajan @ 2007-12-18 17:18 ` Matija Šuklje 2007-12-18 18:16 ` Aditya Mahajan 0 siblings, 1 reply; 4+ messages in thread From: Matija Šuklje @ 2007-12-18 17:18 UTC (permalink / raw) To: mailing list for ConTeXt users Dne ponedeljek 17. decembra 2007 je Aditya Mahajan napisal(a): > I just put together a simple completion script for texexec in zsh. Sweet, thanks :] > This is my first attempt to write a zsh completion script. Any feedback is > welcome. Well, I'm a Zsh newbie, so I'm in no position to claim anything to be wrong. But what bothers me with your script (as it is right now) is that when apart from 'texexec' there is also a 'texexec_completer' command present. Otherwise, really great work! It inspired me to perhaps even take on some Zsh scripting of my own at some point. Cheers, Matija Šuklje -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: texexec completion script for zsh 2007-12-18 17:18 ` Matija Šuklje @ 2007-12-18 18:16 ` Aditya Mahajan 2007-12-18 18:29 ` Matija Šuklje 0 siblings, 1 reply; 4+ messages in thread From: Aditya Mahajan @ 2007-12-18 18:16 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: TEXT/PLAIN, Size: 1443 bytes --] On Tue, 18 Dec 2007, Matija Šuklje wrote: > Dne ponedeljek 17. decembra 2007 je Aditya Mahajan napisal(a): >> I just put together a simple completion script for texexec in zsh. > > Sweet, thanks :] > >> This is my first attempt to write a zsh completion script. Any feedback is >> welcome. > > Well, I'm a Zsh newbie, So am I. Been using it for about two weeks now. > so I'm in no position to claim anything to be wrong. > But what bothers me with your script (as it is right now) is that when apart > from 'texexec' there is also a 'texexec_completer' command present. Yes. All the completer functions are available as commands. Try _<tab> and you will see all the in-built ones. If you want, you can rename texexec_completer to _texexec. That way, you will not get prompted for it on normal commands. I do not know if _ is reservered for distribution level completers or not, so did not name it _texexec. > Otherwise, really great work! It inspired me to perhaps even take on some Zsh > scripting of my own at some point. I have been fairly impressed zsh tab completion. For example, suppose firefox has hung, and you want to kill it. Earlier, I did something like ps aux | grep firefox look at the pid and kill that process. With zsh, I can do kill -9 firefox<tab> and it finds the pid for me. Sweet. At some point, I hope to get a more sophisticated completer for texexec. Aditya [-- Attachment #2: Type: text/plain, Size: 487 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: texexec completion script for zsh 2007-12-18 18:16 ` Aditya Mahajan @ 2007-12-18 18:29 ` Matija Šuklje 0 siblings, 0 replies; 4+ messages in thread From: Matija Šuklje @ 2007-12-18 18:29 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1095 bytes --] Dne torek 18. decembra 2007 je Aditya Mahajan napisal(a): > Yes. All the completer functions are available as commands. Try _<tab> and > you will see all the in-built ones. Thanks. Nice :] > If you want, you can rename texexec_completer to _texexec. That way, you > will not get prompted for it on normal commands. I do not know if _ is > reservered for distribution level completers or not, so did not name it > _texexec. Hmm, that would be a possibility. If I look at Gentoo's Portage autocompletion, they're all names like '_genlop', '_gentoolkit' etc. ...so IMHO '_texexec' would be quite acceptable. . > look at the pid and kill that process. With zsh, I can do > > kill -9 firefox<tab> and it finds the pid for me. Sweet. I didn't know about that one yet ...but Zsh *is* amazing. Not to mention how the documentation is overpowering. -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje [-- Attachment #1.2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 189 bytes --] [-- Attachment #2: Type: text/plain, Size: 487 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-12-18 18:29 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-12-17 1:15 texexec completion script for zsh Aditya Mahajan 2007-12-18 17:18 ` Matija Šuklje 2007-12-18 18:16 ` Aditya Mahajan 2007-12-18 18:29 ` Matija Šuklje
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).