From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11531 invoked by alias); 12 May 2011 18:14:01 -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: 29250 Received: (qmail 26990 invoked from network); 12 May 2011 18:14:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.83.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:content-type:subject:date:message-id:to :mime-version:x-mailer; bh=zkgJvWB2WP31U3TA6WLVijmcozVpyF06cDw05CVwzZg=; b=IAd7+twnf0UaaeHsU81Gs2f0r0MDm+IYTUyQhishhZGEuVDsMeHaXR5zuNxmA/eGWF 6I1gnb7dCA4++F3D5CZ2m2WM058R0kqq7DxjnTfLoISQiJff0YbG37EPPn/KtNV9IZrz 0z8ApihgpjBIZ8nWnn2Acuoec0i/bwK+Vg4VQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:subject:date:message-id:to:mime-version:x-mailer; b=woVSnXcBrxPcbvAIEKe9o7KuQXmIn9EOBwy1GGo+FdfFW/8wpbDXOJeALeWg1lk8cH z0ykqj4O1V6GkNWpqYmYHIiHFJ4OIJsJd30oLfnvO54/Nx/AjYo5JsetCsfHqQk2uL5s 8vPbm8eZPO7kUTCo57YngH3OPI0lreR94gp2w= From: Paul Anton Letnes Content-Type: multipart/mixed; boundary=Apple-Mail-5-499315324 Subject: completion for unison Date: Thu, 12 May 2011 11:13:49 -0700 Message-Id: <0005CADF-CE7B-4C76-930A-858AE2CCB67A@gmail.com> To: zsh-workers@zsh.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) --Apple-Mail-5-499315324 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hello! (This was suggested by someone on #zsh on the freenode network.) Unison is a very useful file synchronization tool, and works both = locally, via ssh or rsync, and others. Unlike (for instance) scp and = rsync, unison also handles deletion, ignoring certain files, and a ton = of other features. I am not a unison developer, but as a happy user, I = recommend it highly at any appropriate opportunity. I have written a completion script for the command line version of = unison (a gui also exists, for those with fear of text commands). I = thought it would be great to share it with the world, so perhaps it will = make it into the next zsh release? Feel free to come with changes or suggestions, as my understanding of = the zsh completion system is not as deep as my appreciation of it. I = just looked at various examples and built my script from there. Cheers, Paul. PS: I do not subscribe to this list (yet) so please CC me with any replies. --Apple-Mail-5-499315324 Content-Disposition: attachment; filename=_unison Content-Type: application/octet-stream; name="_unison" Content-Transfer-Encoding: 7bit #compdef unison local expl _unison_profiles() { local a a=( $HOME/.unison/*.prf(:t) ) _wanted profiles expl 'Profile names' compadd "$@" -a - a } _arguments \ '-addprefsto xxx [file to add new prefs to]' \ '-addversionno [add version number to name of unison executable on server]' \ '-auto [automatically accept default actions]' \ '-backup xxx [add a pattern to the backup list]' \ '-backupcurrent xxx [add a pattern to the backupcurrent list]' \ '-backupcurrentnot xxx [add a pattern to the backupcurrentnot list]' \ '-backupdir xxx [Directory for storing centralized backups]' \ "-backuplocation xxx [where backups are stored ('local' or 'central')]" \ '-backupnot xxx [add a pattern to the backupnot list]' \ '-backupprefix xxx [prefix for the names of backup files]' \ "-backups [keep copies of all files (see also 'backup')]" \ '-backupsuffix xxx [a suffix to be added to names of backup files]' \ '-batch [batch : ask no questions at all]' \ '-confirmbigdeletes [request for whole-replica deletes]' \ '-confirmmerge [ask confirmation before commiting results of a merge]' \ "-contactquietly [Suppress 'contacting server' message during startup]" \ "-debug xxx [debug module xxx ('all' -> everything, 'verbose' -> more)]" \ "-doc xxx [show documentation ('-doc topics' lists topics)]" \ '-dumbtty [do try to change terminal settings in text UI]' \ "-fastcheck xxx [do fast update detection ('true', 'false', or 'default')]" \ '-follow xxx [add a pattern to the follow list]' \ '-force xxx [force changes from this replica to the other]' \ '-forcepartial xxx [add a pattern to the forcepartial list]' \ '-group [synchronize group]' \ '-height n [height (in lines) of main window in graphical interface]' \ '-host xxx [bind the socket to this host name in server socket mode]' \ '-ignore xxx [add a pattern to the ignore list]' \ "-ignorecase xxx [ignore upper/lowercase in filenames ('true', 'false', or 'default')]" \ '-ignorelocks [ignore left over from previous run (dangerous!)]' \ '-ignorenot xxx [add a pattern to the ignorenot list]' \ '-immutable xxx [add a pattern to the immutable list]' \ '-immutablenot xxx [add a pattern to the immutablenot list]' \ '-key xxx [define a keyboard shortcut for this profile (in some UIs)]' \ '-killserver [kill when done (even when using sockets)]' \ '-label xxx [provide a descriptive string label for this profile]' \ '-log [record in file specified by logfile preference]' \ '-logfile xxx [Log file name]' \ '-maxbackups n [number of backed up versions of a file]' \ '-maxthreads n [maximum number of simultaneous file transfers]' \ '-merge xxx [add a pattern to the merge list]' \ '-mountpoint xxx [abort if this path does not exist]' \ "-numericids [don't map uid/gid values by user/group names]" \ '-owner [synchronize owner]' \ '-path xxx [path to synchronize]' \ '-perms n [part of the permissions which is synchronized]' \ "-prefer xxx [choose this replica's version for conflicting changes]" \ '-preferpartial xxx [add a pattern to the preferpartial list]' \ '-pretendwin [Use times for detecting updates]' \ '-repeat xxx [synchronize repeatedly (text interface only)]' \ '-retry n [re-try failed synchronizations N times (text interface only)]' \ '-root xxx [root of a replica]' \ '-rootalias xxx [Register alias for canonical root names]' \ "-rsrc xxx [synchronize resource forks and HFS meta-data ('true', 'false', or 'default')]" \ '-rsync [activate rsync transfer mode]' \ '-selftest [run tests and exit]' \ '-servercmd xxx [name of unison executable on remote server]' \ "-showarchive [show of archive and 'true names' (for rootalias) of roots]" \ '-silent [print (except error messages)]' \ '-socket xxx [act as a server on a socket]' \ '-sortbysize [list files by size, not name]' \ '-sortfirst xxx [add a pattern to the sortfirst list]' \ '-sortlast xxx [add a pattern to the sortlast list]' \ '-sortnewfirst [list before changed files]' \ '-sshargs xxx [other arguments (if any) for remote shell command]' \ '-sshcmd xxx [path to the ssh executable]' \ '-terse [suppress messages]' \ '-testserver [exit after the connection to the server]' \ '-times [synchronize times]' \ "-ui xxx [select user interface ('text' or 'graphic'); command-line only]" \ '-version [print and exit]' \ '-xferbycopying [optimize using local copies, if possible]' _unison_profiles "$@" --Apple-Mail-5-499315324--