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

[PATCH] Add basic completion for xmms2 add/radd/addpls



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@xxxxxxxxxxx>
---
 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



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