Kill some obsolete references to -A option.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
This commit is contained in:
Chantry Xavier 2008-03-16 22:23:47 +01:00 committed by Dan McGee
parent b3e6cf652c
commit 73ab153c44
3 changed files with 5 additions and 16 deletions

View file

@ -146,14 +146,13 @@ _pacman ()
toparse="${a:2}" toparse="${a:2}"
case "${arg}" in case "${arg}" in
-@(A|U|R|S|Q|h|V)) -@(U|R|S|Q|h|V))
op="${arg/-}" op="${arg/-}"
mod="${mod}${a:2}" mod="${mod}${a:2}"
;; ;;
--) --)
arg="${a:2}" arg="${a:2}"
case "${arg}" in case "${arg}" in
add) op="A" ;;
remove) op="R" ;; remove) op="R" ;;
upgrade) op="U" ;; upgrade) op="U" ;;
query) op="Q" ;; query) op="Q" ;;
@ -203,7 +202,6 @@ _pacman ()
if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '\ COMPREPLY=( $( compgen -W '\
-A --add \
-h --help \ -h --help \
-Q --query \ -Q --query \
-R --remove \ -R --remove \
@ -217,7 +215,7 @@ _pacman ()
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
case "${op}" in case "${op}" in
A|U) U)
COMPREPLY=( $( compgen -W '\ COMPREPLY=( $( compgen -W '\
--asdeps \ --asdeps \
--asexplicit \ --asexplicit \
@ -320,7 +318,7 @@ _pacman ()
rem_selected rem_selected
else else
case "${op}" in case "${op}" in
A|U) U)
COMPREPLY=( $( compgen -d -- "$cur" ) \ COMPREPLY=( $( compgen -d -- "$cur" ) \
$( compgen -f -X '!*.pkg.tar.gz' -- "$cur" ) ) $( compgen -f -X '!*.pkg.tar.gz' -- "$cur" ) )
return 0 return 0

View file

@ -6,7 +6,6 @@ typeset -A opt_args
# options for passing to _arguments: main pacman commands # options for passing to _arguments: main pacman commands
_pacman_opts_commands=( _pacman_opts_commands=(
'-A[Add a package to the system]'
'-Q[Query the package database]' '-Q[Query the package database]'
'-R[Remove a package from the system]' '-R[Remove a package from the system]'
'-S[Synchronize packages]' '-S[Synchronize packages]'
@ -29,7 +28,7 @@ _pacman_opts_common=(
'--noscriptlet[Do not execute the install scriptlet if one exists]' '--noscriptlet[Do not execute the install scriptlet if one exists]'
) )
# options for passing to _arguments: options for --add and --update commands # options for passing to _arguments: options for --upgrade commands
_pacman_opts_pkgfile=( _pacman_opts_pkgfile=(
'-d[Skip dependency checks]' '-d[Skip dependency checks]'
'-f[Overwrite conflicting files]' '-f[Overwrite conflicting files]'
@ -94,13 +93,6 @@ _pacman_opts_sync_modifiers=(
'--asexplicit[Install packages as explicitly installed]' '--asexplicit[Install packages as explicitly installed]'
) )
# handles --action subcommand
_pacman_action_add() {
_arguments -s : \
"$_pacman_opts_common[@]" \
"$_pacman_opts_pkgfile[@]"
}
# handles --help subcommand # handles --help subcommand
_pacman_action_help() { _pacman_action_help() {
_arguments -s : \ _arguments -s : \
@ -291,7 +283,6 @@ _pacman_get_command() {
# main dispatcher # main dispatcher
_pacman() { _pacman() {
case $words[2] in case $words[2] in
-A*) _pacman_action_add ;;
-Q*g*) # ipkg groups -Q*g*) # ipkg groups
_arguments -s : \ _arguments -s : \
"$_pacman_opts_common[@]" \ "$_pacman_opts_common[@]" \

View file

@ -160,7 +160,7 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
_alpm_log(PM_LOG_ERROR, _("you cannot install two conflicting packages at the same time\n")); _alpm_log(PM_LOG_ERROR, _("you cannot install two conflicting packages at the same time\n"));
} }
if(outer) { if(outer) {
_alpm_log(PM_LOG_ERROR, _("replacing packages with -A and -U is not supported yet\n")); _alpm_log(PM_LOG_ERROR, _("replacing packages with -U is not supported yet\n"));
_alpm_log(PM_LOG_ERROR, _("you can replace packages manually using -Rd and -U\n")); _alpm_log(PM_LOG_ERROR, _("you can replace packages manually using -Rd and -U\n"));
} }
RET_ERR(PM_ERR_CONFLICTING_DEPS, -1); RET_ERR(PM_ERR_CONFLICTING_DEPS, -1);