I'm applying this one without much review (thanks!)

On Thu, Mar 12, 2009 at 13:42:23 -0700, Nicolas Pouillard wrote:
> Thu Mar 12 21:35:09 CET 2009  Nicolas Pouillard <[email protected]>
>   * New updated Zsh completion script (c.f. issue 1301)

Any zsh users want to have a look?  Can we get rid of the old script?

New updated Zsh completion script (c.f. issue 1301)
---------------------------------------------------
> Nicolas Pouillard <[email protected]>**20090312203509
>  Ignore-this: f2c93c75b8d128d31db264eb77cdddba
> ] addfile ./tools/_darcs.zsh
> hunk ./tools/_darcs.zsh 1
> +#compdef darcs
> +
> +if (($CURRENT == 2)); then
> +  # We're completing the first word after "darcs" -- the command.
> +  _wanted command expl 'darcs command' \
> +    compadd -- $( darcs --commands )
> +else
> +  case "${words[$CURRENT]}"; in
> +    # If it looks like an URL...
> +    ht*|ft*)
> +        _arguments '*:URL:_urls'
> +        ;;
> +    # If it looks like an explicit path...
> +    /*|./*|\~*|../*)
> +        _arguments '*:file:_files'
> +        ;;
> +    # Otherwise, let's ask darcs for at possible options
> +    *)
> +      _wanted args expl 'arg for darcs command' \
> +        compadd -- $( darcs ${words[2]} --list-option )
> +      ;;
> +  esac
> +fi
> 

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to