From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24585 invoked by alias); 28 Jun 2014 13:26:55 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32817 Received: (qmail 10740 invoked from network); 28 Jun 2014 13:26:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Sat, 28 Jun 2014 15:26:34 +0200 From: Axel Beckert To: zsh-workers@zsh.org Subject: Fwd: Bug#630410: moosic: zsh completions [origin: omari@smileystation.com] Message-ID: <20140628132634.GA526@sym.noone.org> Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline X-Operating-System: Linux 3.2.0-4-amd64 X-Machine: sym2 x86_64 X-Editor: GNU Emacs 23.4.1 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAAAAAC3mUtaAAAABGdBTUEAALGPC/xhBQAAADh0RVh0U29mdHdhcmUAWFYgVmVyc2lvbiAzLjEwYSAgUmV2OiAxMi8yOS85NCAoUE5HIHBhdGNoIDEuMindFS5JAAACGElEQVQ4jXXQMU8UYRDG8f8shNjdDH4AbpfGDjAWlKiJiZ0ajL1aGCvsNCbGaCGG1koLaztaTYz6ATy+gOyehYmF3MxVxgg3FnDsHcTpJr/M+8w7Rf6nCsaVTTDqxbg9hoOXmw83H71+Eyfg4E1d7/Z2fG9rGkZbTQiu+K+3U/C+76lmkvAhJuDndnoAiftou4V84okAGclop4U/jYACZDTxrYWP0gkxVfAm/W//GLZpxIzwIN0Hn8dw0B+IWkZmQmRsj2HfhwokEklHfNCCiQCRgAR7YyhQVRVTCKCzP4Y5zBBE0t0zY3Q8oQaBqqAMlVEcgVQd9706zGirAFium8HXumlMIeMwqQCInju+2+uB6MRENupdpMt8pRlHZyuAW0F+Mb6XSIVqtxjD+iVmVqqystLEzFTGT92YqRaXpNT5eTVjeJhbALPnrTxLUZUKZsgxcNm64hAOYisT/xhF+oKTGU5RegtC3Rt6eEDi/QnIevdTx9Md2EMmYBRmCQR1026FCGQQJJExsRUqgkMGaWSbwYLnoO4T6VgpbQbdELPMBAHWWrhYrcxXnYgAsatPWygkFCBD4K62MAsOTqA6szYRPpsu6e6Y8mPiVrBMNuGIMrgwBUu4p2DgG1Ownu6hpuTv7hScefHAzAC/yRRw5U5pALMbJ4AUALvHSZhxgHPXTsHcdWD1GadAHr9avP+c0wCr7263Df8ASLwXWHWs+KIAAAAHdElNRQfYBQEBODPr Organization: DeuxChevaux.org -- The =?iso-8859-1?Q?Citr?= =?iso-8859-1?B?b+tu?= 2CV Database User-Agent: Mutt/1.5.21 (2010-09-15) --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, attached the zsh completion for moosic, an MP3 player client-server combo. See http://www.nanoo.org/software/moosic/. Initially reported in Debian at https://bugs.debian.org/630410 Kind regards, Axel -- /~\ Plain Text Ribbon Campaign | Axel Beckert \ / Say No to HTML in E-Mail and News | abe@deuxchevaux.org (Mail) X See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber) / \ I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web) --BXVAT5kNtrzKuDFl Content-Type: message/rfc822 Content-Disposition: inline X-Loop: owner@bugs.debian.org Subject: Bug#630410: moosic: zsh completions Reply-To: Omari Norman , 630410@bugs.debian.org Resent-From: Omari Norman Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: omari@smileystation.com, Arto Jantunen X-Loop: owner@bugs.debian.org Resent-Date: Mon, 13 Jun 2011 19:42:15 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: report 630410 X-Debian-PR-Package: moosic X-Debian-PR-Keywords: patch upstream X-Debian-PR-Source: moosic Received: via spool by submit@bugs.debian.org id=B.130799406215157 (code B ref -1); Mon, 13 Jun 2011 19:42:15 +0000 Received: (at submit) by bugs.debian.org; 13 Jun 2011 19:41:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.1-bugs.debian.org_2005_01_02 (2010-03-16) on busoni.debian.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=4.0 tests=BAYES_00,FOURLA,HAS_PACKAGE, MONEY,MURPHY_DRUGS_REL8,RCVD_IN_PBL,RDNS_DYNAMIC,STOCKLIKE,XMAILER_REPORTBUG, X_DEBBUGS_CC autolearn=ham version=3.3.1-bugs.debian.org_2005_01_02 X-Spam-Bayes: score:0.0000 Tokens: new, 131; hammy, 150; neutral, 275; spammy, 1. spammytokens:0.998-+--advancement hammytokens:0.000-+--H*M:reportbug, 0.000-+--H*MI:reportbug, 0.000-+--H*x:reportbug, 0.000-+--H*UA:reportbug, 0.000-+--H*x:4.12.6 Received: from 252.sub-75-192-158.myvzw.com ([75.192.158.252] helo=barry.normanonet.net) by busoni.debian.org with esmtp (Exim 4.72) (envelope-from ) id 1QWD0P-0003wI-KB for submit@bugs.debian.org; Mon, 13 Jun 2011 19:41:02 +0000 Content-Type: multipart/mixed; boundary="===============1742712144==" MIME-Version: 1.0 From: Omari Norman To: Debian Bug Tracking System Message-ID: <20110613194100.24570.59164.reportbug@barry.normanonet.net> X-Mailer: reportbug 4.12.6 Date: Mon, 13 Jun 2011 15:41:00 -0400 Delivered-To: submit@bugs.debian.org This is a multi-part MIME message sent by reportbug. --===============1742712144== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Package: moosic Version: 1.5.4-6 Severity: wishlist Tags: upstream patch Here are some zsh completions for moosic...I would send them upstream but I'm not sure upstream is still alive... -- System Information: Debian Release: 6.0.1 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-686-bigmem (SMP w/2 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages moosic depends on: ii python 2.6.6-3+squeeze6 interactive high-level object-orie ii python-support 1.0.10 automated rebuilding support for P Versions of packages moosic recommends: ii mpg321 0.2.12-1 Simple and lighweight command line Versions of packages moosic suggests: pn mikmod (no description available) pn sox (no description available) pn timidity (no description available) pn vorbis-tools (no description available) -- no debconf information --===============1742712144== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="_moosic" #compdef moosic _moosic_add_cmds() { # querying for information typeset -a queries queries=( "help:print brief description of command" "current:print name of currently playing song" "current-time:print the amount of time the current song has been playing" "list:print the list of items in the current song queue" "plainlist:print the current song queue without numbering each line" "history:print a list of items that were recently played" {status,state}":print the current state of the music daemon" "length:print the number of items in the queue" "ispaused:show whether the current song is paused or not" "islooping:show whether the server is in loop mode" "isadvancing:show whether the server is advancing through the song queue" "version:print version information for client and server" ) # appending to song queue typeset -a appending appending=( {append,add}":add the files to be played to the end of the song queue" {pl-append,pl-add}":add the items listed in the given playlist files to end of queue" "prepend:add the files to be played to the beginning of the song queue" "pl-prepend:add the items in the given playlist files to beginning of queue" "mixin:add the files to the song queue and reshuffle the entire queue" "pl-mixin:add items in given playlist files to song queue and reshuffle the entire queue" "replace:replace the current contents of the song queue with files listed" "pl-replace:replace current contents of song queue with songs given in playlists" "insert:insert the given items at a given point in the song queue" "pl-insert:insert items from playlist files at specified point in queue" "putback:reinsert current song at start of song queue" "stagger-add:adds file list to end of queue after rearranging queue into staggered order" "stagger-merge:adds given file list to queue in interleaved fashion" "interval-add:inserts given songs with regular frequency specified by interval argument" ) # removing typeset -a removing removing=( {cut,del}":removes all song queue items in given range" "crop:removes all song queue items that do not fall within given range" "remove:remove all song queue items matching any one of given regexps" "filter:remove all queue items not matching all given regexps" "clear:clear song queue" "wipe:clear song queue and stop current song" ) # rearranging typeset -a rearranging rearranging=( "move:move all items in given range to new position in song queue" "move-pattern:moves all items matching the given regexp to new position" "swap:trade places of songs in two specified ranges" {shuffle,reshuffle}":reshuffle song queue within an optional range" "sort:sort queue within optional range" "reverse:reverse order of song queue" "partial-sort:sort items matching each regexp" "stagger:stagger items matching each regexp" "sub:perform regular expression substitution on all items in queue" "suball:like sub, but replace all occurrences of the pattern" ) # general management typeset -a general general=( "next:jumps ahead, number of songs optional" "previous:retreats to previously played song" "goto:jumps to next song matching regexp" "gobackto:jumps back to most recent previous song matching regexp" "noadvance:halt queue advancement" "advance:resume queue advancement" "toggle-advance:toggle queue advancement" "stop:stop playing current song, stop processing queue, put current song back" "pause:suspend current song to resume it later" "unpause:unpause current song" "play:resume playing" "loop:turn loop mode on" "noloop:turn loop mode off" "toggle-loop:toggle loop mode" "reconfigure:daemon reload configuration file" "showconfig:show dameon filetype associations" "start-server:starts new instance of daemon with given options" {quit,exit,die}":quit daemon" ) _describe queries queries -J queries _describe appending appending -J appending _describe removing removing -J removing _describe rearranging rearranging -J rearranging _describe general general -J general } _moosic() { typeset context state line typeset -A opt_args typeset -a filelist_opts filelist_opts=( '(-g --shuffle-global)'{-g,--shuffle-global}'[shuffle filelist after directory expansion]' '(-d --shuffle-dir)'{-d,--shuffle-dir}'[shuffle results of expanding the directories]' '(-a --shuffle-args)'{-a,--shuffle-args}'[shuffle actual command line arguments]' '(-o --inorder)'{-o,--inorder}'[do not shuffle filelist]' '(-s --sort)'{-s,--sort}'[sort filelist lexicographically after expansion]' '(-r --no-recurse)'{-r,--no-recurse}'[do not recurse through directories]' '(-n --no-file-munge)'{-n,--no-file-munge}'[do not modify names in expanded filelist]' '(-f --auto-find)'{-f,--auto-find}'[perform fuzzy search for music files]' '(-F --auto-grep)'{-F,--auto-grep}'[like --auto-find but with regexp]' '(-U --allow-unplayable)'{-U,--allow-unplayable}'[allow addition of unknown song types]' ) typeset -a auto_opts auto_opts=( '(-m --music-dir)'{-m,--music-dir}'[directory used for auto-find, auto-grep]:directory:_files' ) typeset -a main_opts main_opts=( '(-i --ignore-case)'{-i,--ignore-case}'[treat regexps as if they are case-insensitive]' '(-S --showcommands)'{-S,--showcommands}'[show all moosic commands, then exit]' '(-h --help)'{-h,--help}'[print help message then exit]' '(-v --version)'{-v,--version}'[print version information, then exit]' '(-c --config-dir)'{-c,--config-dir}'[configuration directory]:directory:_files' '(-t --tcp)'{-t,--tcp}'[talk to server at specified host and port]:host\:port:' '(-N --no-startserver)'{-N,--no-startserver}'[do not start moosicd server]' ) typeset -a list_opts list_opts=( '(-C --current-in-list)'{-C,--current-in-list}'[print currently playing song in list]' ) # GLOBAL ARGUMENTS # do not use the -A option here. It will break the processing of # positional arguments. _arguments $main_opts $list_opts $auto_opts $filelist_opts \ '1: :->cmd' \ '*:: :->posarg' if [[ $state == cmd ]]; then _moosic_add_cmds elif [[ $state == posarg ]]; then _moosic_cmd_${line[1]} fi } # Do something, but only if the current word is 2. _do2() { if (( CURRENT == 2 )); then $@ else _message 'no more arguments' fi } ### QUERY COMMANDS _moosic_cmd_help() { _do2 '_moosic_add_cmds' } _moosic_cmd_current() { _message 'no arguments' } _moosic_cmd_current-time() { _do2 '_message' 'strftime string' } _moosic_cmd_list() { _do2 '_message' 'range' } _moosic_cmd_plainlist() { _do2 '_message' 'range' } _moosic_cmd_history() { _do2 '_message' 'maximum number of entries' } _moosic_cmd_status() { _message 'no arguments' } _moosic_cmd_state() { _message 'no arguments' } _moosic_cmd_length() { _message 'no arguments' } _moosic_cmd_ispaused() { _message 'no arguments' } _moosic_cmd_islooping() { _message 'no arguments' } _moosic_cmd_isadvancing() { _message 'no arguments' } _moosic_cmd_version() { _message 'no arguments' } ### APPENDING COMMANDS _moosic_song_files() { _arguments -A '-*' $main_opts $filelist_opts $auto_opts \ '*:song files:_files' } _moosic_cmd_append() { _moosic_song_files } _moosic_cmd_add() { _moosic_song_files } _moosic_cmd_pl-append() { _moosic_song_files } _moosic_cmd_pl-add() { _moosic_song_files } _moosic_cmd_prepend() { _moosic_song_files } _moosic_cmd_pl-prepend() { _moosic_song_files } _moosic_cmd_mixin() { _moosic_song_files } _moosic_cmd_pl-mixin() { _moosic_song_files } _moosic_cmd_replace() { _moosic_song_files } _moosic_cmd_pl-replace() { _moosic_song_files } _moosic_cmd_insert() { _moosic_song_files } _moosic_cmd_pl-insert() { _moosic_song_files } _moosic_cmd_putback() { _message 'no arguments' } _moosic_cmd_stagger-add() { _moosic_song_files } _moosic_cmd_stagger-merge() { _moosic_song_files } _moosic_cmd_interval-add() { _arguments -A '-*' $main_opts $filelist_opts \ '1:interval:' \ '*:song files:_files' } ### REMOVING COMMANDS _moosic_cmd_cut() { _do2 '_message' 'range' } _moosic_cmd_del() { _do2 '_message' 'range' } _moosic_cmd_crop() { _do2 '_message' 'range' } _moosic_cmd_remove() { _do2 '_message' 'regex' } _moosic_cmd_filter() { _do2 '_message' 'regex' } _moosic_cmd_clear() { _message 'no arguments' } _moosic_cmd_wipe() { _message 'no arguments' } ### REARRANGING COMMANDS _moosic_cmd_move() { _arguments -A '-*' $main_opts \ '1:range:' \ '2:index:' \ '*:no more arguments:' } _moosic_cmd_move-pattern() { _arguments -A '-*' $main_opts \ '1:regex:' \ '2:index:' \ '*:no more arguments:' } _moosic_cmd_swap() { _arguments -A '-*' $main_opts \ '1:range:' \ '2:range:' \ '*:no more arguments:' } _moosic_cmd_shuffle() { _arguments -A '-*' $main_opts \ '1:range (optional):' \ '*:no more arguments:' } _moosic_cmd_reshuffle() { _arguments -A '-*' $main_opts \ '1:range (optional):' \ '*:no more arguments:' } _moosic_cmd_sort() { _arguments -A '-*' $main_opts \ '1:range (optional):' \ '*:no more arguments:' } _moosic_cmd_reverse() { _arguments -A '-*' $main_opts \ '1:range (optional):' \ '*:no more arguments:' } _moosic_cmd_partial-sort() { _do2 '_message' 'regex' } _moosic_cmd_stagger() { _do2 '_message' 'regex' } _moosic_cmd_sub() { _arguments -A '-*' $main_opts \ '1:pattern:' \ '2:replacement:' \ '3:range (optional):' \ '*:no more arguments:' } _moosic_cmd_suball() { _arguments -A '-*' $main_opts \ '1:pattern:' \ '2:replacement:' \ '3:range (optional):' \ '*:no more arguments:' } ### GENERAL COMMANDS _moosic_cmd_next() { if (( CURRENT == 2 )); then typeset -a display display_cmd if zstyle -a ":completion:${curcontext}:next" \ 'command' display_cmd; then $display_cmd else display=(${(f)"$(moosic list)"}) fi typeset -a numbers numbers=({1..${#display}}) compadd -V songs -d display -a numbers else _message 'no more arguments' fi } _moosic_cmd_previous() { _do2 '_message' 'number to skip' } _moosic_cmd_goto() { _do2 '_message' 'regex' } _moosic_cmd_gobackto() { _do2 '_message' 'regex' } _moosic_cmd_noadvance() { _message 'no arguments' } _moosic_cmd_advance() { _message 'no arguments' } _moosic_cmd_toggle-advance() { _message 'no arguments' } _moosic_cmd_stop() { _message 'no arguments' } _moosic_cmd_pause() { _message 'no arguments' } _moosic_cmd_unpause() { _message 'no arguments' } _moosic_cmd_play() { _message 'no arguments' } _moosic_cmd_loop() { _message 'no arguments' } _moosic_cmd_noloop() { _message 'no arguments' } _moosic_cmd_toggle-loop() { _message 'no arguments' } _moosic_cmd_reconfigure() { _message 'no arguments' } _moosic_cmd_showconfig() { _message 'no arguments' } _moosic_cmd_start-server() { _message 'options' } _moosic_cmd_quit() { _message 'no arguments' } _moosic_cmd_exit() { _message 'no arguments' } _moosic_cmd_die() { _message 'no arguments' } _moosic "$@" --===============1742712144==-- --BXVAT5kNtrzKuDFl Content-Type: message/rfc822 Content-Disposition: inline X-Loop: owner@bugs.debian.org Subject: Bug#630410: moosic: zsh completions Reply-To: Clint Adams , 630410@bugs.debian.org Resent-From: Clint Adams Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: Arto Jantunen X-Loop: owner@bugs.debian.org Resent-Date: Mon, 13 Jun 2011 19:51:06 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: followup 630410 X-Debian-PR-Package: moosic X-Debian-PR-Keywords: patch upstream X-Debian-PR-Source: moosic Received: via spool by 630410-submit@bugs.debian.org id=B630410.130799449116384 (code B ref 630410); Mon, 13 Jun 2011 19:51:06 +0000 Received: (at 630410) by bugs.debian.org; 13 Jun 2011 19:48:11 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.1-bugs.debian.org_2005_01_02 (2010-03-16) on busoni.debian.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=4.0 tests=BAYES_00,FROMDEVELOPER, HAS_BUG_NUMBER,URIBL_CNKR autolearn=ham version=3.3.1-bugs.debian.org_2005_01_02 X-Spam-Bayes: score:0.0000 Tokens: new, 10; hammy, 67; neutral, 44; spammy, 0. spammytokens: hammytokens:0.000-+--H*u:1.5.20, 0.000-+--H*UA:1.5.20, 0.000-+--H*u:2009-06-14, 0.000-+--H*UA:2009-06-14, 0.000-+--HX-Spam-Relays-External:cork.scru.org Received: from cork.scru.org ([209.20.67.2]) by busoni.debian.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QWD7K-0004Fx-Ub for 630410@bugs.debian.org; Mon, 13 Jun 2011 19:48:11 +0000 Received: by cork.scru.org (Postfix, from userid 1000) id C44B1104152; Mon, 13 Jun 2011 19:49:04 +0000 (UTC) Date: Mon, 13 Jun 2011 19:49:04 +0000 From: Clint Adams To: Omari Norman , 630410@bugs.debian.org Message-ID: <20110613194904.GA13905@scru.org> References: <20110613194100.24570.59164.reportbug@barry.normanonet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110613194100.24570.59164.reportbug@barry.normanonet.net> User-Agent: Mutt/1.5.20 (2009-06-14) On Mon, Jun 13, 2011 at 03:41:00PM -0400, Omari Norman wrote: > Here are some zsh completions for moosic...I would send them upstream > but I'm not sure upstream is still alive... You're better off sending them to zsh-workers@zsh.org instead. --BXVAT5kNtrzKuDFl--