From 447213fc519df3fd0741aa0cb52e641060d4df83 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 7 Jul 2009 10:42:08 +0200 Subject: Shortened pkg, updated pkg(1) and the zsh completion --- bin/pkg | 10 ++++++---- man/1/pkg | 6 +++--- provides/zsh/completions/_pkg | 12 ++++++++---- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/bin/pkg b/bin/pkg index f69cc0a..471f3a9 100755 --- a/bin/pkg +++ b/bin/pkg @@ -824,10 +824,13 @@ cd $PKG_DIR || die "Cannot cd $PKG_DIR" # Note: # wrap foobar "$1" <- the "" are neccessary here, since $1 is optional (and therefore may be empty) case $action in - add) pkg_add $* ;; - delete) pkg_remove $* ;; + add|install) + pkg_add $* + ;; + delete|remove) + pkg_remove $* + ;; info) pkg_info $* ;; - install) pkg_add $* ;; list) pkg_list $* ;; log) pkg_log $* ;; push) @@ -835,7 +838,6 @@ case $action in wrap pkg_push "$1" 'Pushing' ;; refresh) wrap pkg_refresh "$1" 'Refreshing' ;; - remove) pkg_remove $* ;; status) wrap pkg_status "$1" 'Checking package status' ;; update) pkg_update $* ;; upgrade|pull) diff --git a/man/1/pkg b/man/1/pkg index 64027e5..3b5c689 100644 --- a/man/1/pkg +++ b/man/1/pkg @@ -16,11 +16,11 @@ I may be one of: =over -=item B|B I +=item B I fetch given I from the package_root and install it -=item B|B I +=item B I Remove I from the local packages tree @@ -75,7 +75,7 @@ If no arguments is given, checks all installed packages Update local/remote package list (both if no argument is given) -=item B|B [ I ] +=item B [ I ] retrieve and install newest available version of I. If no argument is given, updates all installed packages diff --git a/provides/zsh/completions/_pkg b/provides/zsh/completions/_pkg index 4fe4922..33992fd 100644 --- a/provides/zsh/completions/_pkg +++ b/provides/zsh/completions/_pkg @@ -9,8 +9,8 @@ typeset expl function _pkg_action () { _wanted action expl 'action' \ - compadd add install delete eval remove info list \ - log pull push refresh status update upgrade + compadd add eval remove info list \ + log pull push refresh status update } function _pkg_installed () { @@ -31,13 +31,13 @@ function _pkg_notinstalled () { function _pkg_args { if (( CURRENT == 2 )) { case ${words[1]} in - changelog|check|delete|log|pull|push|refresh|remove|status|upgrade) + log|pull|push|refresh|remove|status) _pkg_installed ;; info) _pkg_all ;; - add|install) + add) _pkg_notinstalled ;; eval) @@ -84,5 +84,9 @@ _arguments \ '*--checklinks-options[options for checklinks]:option' \ '--packagedir[package directory]:directory:_files -/' \ '--packageroot[package root]:url' \ + '--colours[use colours]' \ + '--no-colours[No colours]' \ + '--progress[show progress bar]' \ + '--no-progress[No progress bar]' \ ':action:_pkg_action' \ '*::arguments:_pkg_args' -- cgit v1.2.3