zsh-workers
 help / color / mirror / code / Atom feed
* Basic completion for xmms2 add/radd/addpls
@ 2009-05-04  8:10 martin f. krafft
  2009-05-04  8:10 ` [PATCH] Add basic " martin f. krafft
  0 siblings, 1 reply; 2+ messages in thread
From: martin f. krafft @ 2009-05-04  8:10 UTC (permalink / raw)
  To: zsh-workers; +Cc: penny

Patch is self-explanatory.

I am sure there's room for improvement. Since I am getting started with
completion, I'd appreciate any feedback.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] Add basic completion for xmms2 add/radd/addpls
  2009-05-04  8:10 Basic completion for xmms2 add/radd/addpls martin f. krafft
@ 2009-05-04  8:10 ` martin f. krafft
  0 siblings, 0 replies; 2+ messages in thread
From: martin f. krafft @ 2009-05-04  8:10 UTC (permalink / raw)
  To: zsh-workers; +Cc: penny, martin f. krafft

This just adds basic completion functions to the xmms2 completion
widgets:

  add        files
  radd       directories
  addpls     files matching *.(pls|m3u) (case-insenitive)

Signed-off-by: martin f. krafft <madduck@madduck.net>
---
 Completion/Unix/Command/_xmms2 |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/Completion/Unix/Command/_xmms2 b/Completion/Unix/Command/_xmms2
index f132ada..d25802e 100644
--- a/Completion/Unix/Command/_xmms2
+++ b/Completion/Unix/Command/_xmms2
@@ -190,6 +190,20 @@ _xmms2_coll_attr() {
     _xmms2_coll_helper
 }
 
+_xmms2_add() {
+  _files
+}
+
+_xmms2_radd() {
+  _dirs
+}
+
+_xmms2_addpls() {
+  local expl
+  _description files expl 'playlist'
+  _files "$expl[@]" -g '*.([mM]3[uU]|[pP][lL][sS])'
+}
+
 _xmms2() {
 _arguments \
     '--format[specify the format of song display]:format string' \
-- 
1.6.2.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-04  8:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-04  8:10 Basic completion for xmms2 add/radd/addpls martin f. krafft
2009-05-04  8:10 ` [PATCH] Add basic " martin f. krafft

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).