mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-09 04:57:59 -05:00
* Updated bash_completion script to 3.0 options.
* Changed that removal message again, hopefully it sounds good now. * Shortened a usage option description so it would not wrap at 81 chars.
This commit is contained in:
parent
d86bea5c8d
commit
bd6adec40b
@ -1,25 +1,25 @@
|
|||||||
# vim: set ft=sh:
|
# vim: set ft=sh ts=2 sw=2 et:
|
||||||
# file: /etc/bash_completion.d/pacman
|
# file: /etc/bash_completion.d/pacman
|
||||||
|
|
||||||
# Bash completion for ArchLinux
|
# Bash completion for pacman
|
||||||
# Original: v.1.1 Manolis Tzanidakis <mtzanidakis@freemail.gr>
|
# Original: Manolis Tzanidakis <mtzanidakis@freemail.gr>
|
||||||
#
|
#
|
||||||
# Distributed under the terms of the GNU General Public License, v2 or later.
|
# Distributed under the terms of the GNU General Public License, v2 or later.
|
||||||
#
|
#
|
||||||
|
|
||||||
## Changelog ####################################################
|
## ChangeLog ##
|
||||||
# #
|
#
|
||||||
# * 1.1 (20040117) #
|
# * 3.0 (2007-02-18)
|
||||||
# - Code cleanup #
|
# - Updated to pacman 3.0.0 options
|
||||||
# - Updated to pacman 2.7.2-2 #
|
# * 1.1 (2004-01-17)
|
||||||
# * 20040216 (orelien) #
|
# - Code cleanup
|
||||||
# - Improved available_{pkgs,groups) functions #
|
# - Updated to pacman 2.7.2-2
|
||||||
# - Added support for querying groups #
|
# * 2004-02-16 (orelien)
|
||||||
# #
|
# - Improved available_{pkgs,groups) functions
|
||||||
#################################################################
|
# - Added support for querying groups
|
||||||
|
#
|
||||||
|
|
||||||
## initial functions
|
## initial functions
|
||||||
#
|
|
||||||
|
|
||||||
rem_selected ()
|
rem_selected ()
|
||||||
{
|
{
|
||||||
@ -83,14 +83,7 @@ _available_groups ()
|
|||||||
COMPREPLY=( $( compgen -W "$( for i in $available_groups; do echo ${i%-*-*}; done )" -- $cur ) )
|
COMPREPLY=( $( compgen -W "$( for i in $available_groups; do echo ${i%-*-*}; done )" -- $cur ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
## init (/etc/rc.d) script completion (quick 'n' dirty ;-)
|
|
||||||
#
|
|
||||||
|
|
||||||
complete -W "start stop restart" \
|
|
||||||
$(for i in /etc/rc.d/*; do echo ${i##*/}; done)
|
|
||||||
|
|
||||||
## makepkg completion
|
## makepkg completion
|
||||||
#
|
|
||||||
|
|
||||||
_makepkg ()
|
_makepkg ()
|
||||||
{
|
{
|
||||||
@ -100,30 +93,38 @@ _makepkg ()
|
|||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
-@(p|w))
|
-p)
|
||||||
_filedir
|
_filedir
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--help|--cleancache|--genmd5)
|
--help|--cleancache)
|
||||||
COMPREPLY=''
|
COMPREPLY=''
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-b --builddeps \
|
COMPREPLY=( $( compgen -W '\
|
||||||
|
-b --builddeps \
|
||||||
|
-B --noccache \
|
||||||
-c --clean \
|
-c --clean \
|
||||||
-C --cleancache \
|
-C --cleancache \
|
||||||
-d --nodeps \
|
-d --nodeps \
|
||||||
|
-e --noextract \
|
||||||
-f --force \
|
-f --force \
|
||||||
-g --genmd5 \
|
-g --geninteg \
|
||||||
-h --help \
|
-h --help \
|
||||||
-i --install \
|
-i --install \
|
||||||
|
-j \
|
||||||
|
-L --log \
|
||||||
-m --nocolor \
|
-m --nocolor \
|
||||||
-n --nostrip \
|
-o --nobuild \
|
||||||
|
-p \
|
||||||
-r --rmdeps \
|
-r --rmdeps \
|
||||||
-s --syncdeps \
|
-s --syncdeps \
|
||||||
-p -w' -- $cur ) )
|
-S --usesudo \
|
||||||
|
--noconfirm \
|
||||||
|
--noprogressbar' -- $cur ) )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rem_selected
|
rem_selected
|
||||||
@ -131,7 +132,6 @@ _makepkg ()
|
|||||||
complete -o default -F _makepkg makepkg
|
complete -o default -F _makepkg makepkg
|
||||||
|
|
||||||
## pacman completion
|
## pacman completion
|
||||||
#
|
|
||||||
|
|
||||||
_instring ()
|
_instring ()
|
||||||
{
|
{
|
||||||
@ -233,10 +233,13 @@ _pacman ()
|
|||||||
-h --help \
|
-h --help \
|
||||||
--config \
|
--config \
|
||||||
--noconfirm \
|
--noconfirm \
|
||||||
|
--ask \
|
||||||
--noprogressbar \
|
--noprogressbar \
|
||||||
|
--noscriptlet \
|
||||||
-v --verbose \
|
-v --verbose \
|
||||||
-r --root \
|
-r --root \
|
||||||
-b --dbpath \
|
-b --dbpath \
|
||||||
|
--cachedir \
|
||||||
' -- $cur ) )
|
' -- $cur ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
@ -251,10 +254,13 @@ _pacman ()
|
|||||||
-s --recursive \
|
-s --recursive \
|
||||||
--config \
|
--config \
|
||||||
--noconfirm \
|
--noconfirm \
|
||||||
|
--ask \
|
||||||
--noprogressbar \
|
--noprogressbar \
|
||||||
|
--noscriptlet \
|
||||||
-v --verbose \
|
-v --verbose \
|
||||||
-r --root \
|
-r --root \
|
||||||
-b --dbpath \
|
-b --dbpath \
|
||||||
|
--cachedir \
|
||||||
' -- $cur ) )
|
' -- $cur ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
@ -262,6 +268,7 @@ _pacman ()
|
|||||||
COMPREPLY=( $( compgen -W '\
|
COMPREPLY=( $( compgen -W '\
|
||||||
-c --clean \
|
-c --clean \
|
||||||
-d --nodeps \
|
-d --nodeps \
|
||||||
|
-e --dependsonly \
|
||||||
-f --force \
|
-f --force \
|
||||||
-g --groups \
|
-g --groups \
|
||||||
-h --help \
|
-h --help \
|
||||||
@ -272,17 +279,22 @@ _pacman ()
|
|||||||
-u --sysupgrade \
|
-u --sysupgrade \
|
||||||
-w --downloadonly \
|
-w --downloadonly \
|
||||||
-y --refresh \
|
-y --refresh \
|
||||||
|
--ignore \
|
||||||
--config \
|
--config \
|
||||||
--noconfirm \
|
--noconfirm \
|
||||||
|
--ask \
|
||||||
--noprogressbar \
|
--noprogressbar \
|
||||||
|
--noscriptlet \
|
||||||
-v --verbose \
|
-v --verbose \
|
||||||
-r --root \
|
-r --root \
|
||||||
-b --dbpath \
|
-b --dbpath \
|
||||||
|
--cachedir \
|
||||||
' -- $cur ) )
|
' -- $cur ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
Q)
|
Q)
|
||||||
COMPREPLY=( $( compgen -W '\
|
COMPREPLY=( $( compgen -W '\
|
||||||
|
-c --changelog \
|
||||||
-e --orphans \
|
-e --orphans \
|
||||||
-g --groups \
|
-g --groups \
|
||||||
-h --help \
|
-h --help \
|
||||||
@ -294,10 +306,13 @@ _pacman ()
|
|||||||
-s --search \
|
-s --search \
|
||||||
--config \
|
--config \
|
||||||
--noconfirm \
|
--noconfirm \
|
||||||
|
--ask \
|
||||||
--noprogressbar \
|
--noprogressbar \
|
||||||
|
--noscriptlet \
|
||||||
-v --verbose \
|
-v --verbose \
|
||||||
-r --root \
|
-r --root \
|
||||||
-b --dbpath \
|
-b --dbpath \
|
||||||
|
--cachedir \
|
||||||
' -- $cur ) )
|
' -- $cur ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
@ -241,7 +241,7 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, alpm_list_t *targ,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(skipit) {
|
if(skipit) {
|
||||||
_alpm_log(PM_LOG_WARNING, _("%s has moved packages, skipping removal"),
|
_alpm_log(PM_LOG_WARNING, _("%s has changed ownership, skipping removal"),
|
||||||
file);
|
file);
|
||||||
} else if(needbackup) {
|
} else if(needbackup) {
|
||||||
/* if the file is flagged, back it up to .pacsave */
|
/* if the file is flagged, back it up to .pacsave */
|
||||||
|
@ -134,7 +134,7 @@ static void usage(int op, char *myname)
|
|||||||
} else if(op == PM_OP_SYNC) {
|
} else if(op == PM_OP_SYNC) {
|
||||||
printf(_("usage: %s {-S --sync} [options] [package]\n"), myname);
|
printf(_("usage: %s {-S --sync} [options] [package]\n"), myname);
|
||||||
printf(_("options:\n"));
|
printf(_("options:\n"));
|
||||||
printf(_(" -c, --clean remove old packages from cache directory (use -cc for all)\n"));
|
printf(_(" -c, --clean remove old packages from cache directory (-cc for all)\n"));
|
||||||
printf(_(" -d, --nodeps skip dependency checks\n"));
|
printf(_(" -d, --nodeps skip dependency checks\n"));
|
||||||
printf(_(" -e, --dependsonly install dependencies only\n"));
|
printf(_(" -e, --dependsonly install dependencies only\n"));
|
||||||
printf(_(" -f, --force force install, overwrite conflicting files\n"));
|
printf(_(" -f, --force force install, overwrite conflicting files\n"));
|
||||||
|
Loading…
Reference in New Issue
Block a user