mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-08 12:28:00 -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
|
||||
|
||||
# Bash completion for ArchLinux
|
||||
# Original: v.1.1 Manolis Tzanidakis <mtzanidakis@freemail.gr>
|
||||
# Bash completion for pacman
|
||||
# Original: Manolis Tzanidakis <mtzanidakis@freemail.gr>
|
||||
#
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later.
|
||||
#
|
||||
|
||||
## Changelog ####################################################
|
||||
# #
|
||||
# * 1.1 (20040117) #
|
||||
# - Code cleanup #
|
||||
# - Updated to pacman 2.7.2-2 #
|
||||
# * 20040216 (orelien) #
|
||||
# - Improved available_{pkgs,groups) functions #
|
||||
# - Added support for querying groups #
|
||||
# #
|
||||
#################################################################
|
||||
## ChangeLog ##
|
||||
#
|
||||
# * 3.0 (2007-02-18)
|
||||
# - Updated to pacman 3.0.0 options
|
||||
# * 1.1 (2004-01-17)
|
||||
# - Code cleanup
|
||||
# - Updated to pacman 2.7.2-2
|
||||
# * 2004-02-16 (orelien)
|
||||
# - Improved available_{pkgs,groups) functions
|
||||
# - Added support for querying groups
|
||||
#
|
||||
|
||||
## initial functions
|
||||
#
|
||||
|
||||
rem_selected ()
|
||||
{
|
||||
@ -83,14 +83,7 @@ _available_groups ()
|
||||
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 ()
|
||||
{
|
||||
@ -100,30 +93,38 @@ _makepkg ()
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
case "$prev" in
|
||||
-@(p|w))
|
||||
-p)
|
||||
_filedir
|
||||
return 0
|
||||
;;
|
||||
--help|--cleancache|--genmd5)
|
||||
--help|--cleancache)
|
||||
COMPREPLY=''
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '-b --builddeps \
|
||||
COMPREPLY=( $( compgen -W '\
|
||||
-b --builddeps \
|
||||
-B --noccache \
|
||||
-c --clean \
|
||||
-C --cleancache \
|
||||
-d --nodeps \
|
||||
-e --noextract \
|
||||
-f --force \
|
||||
-g --genmd5 \
|
||||
-g --geninteg \
|
||||
-h --help \
|
||||
-i --install \
|
||||
-j \
|
||||
-L --log \
|
||||
-m --nocolor \
|
||||
-n --nostrip \
|
||||
-o --nobuild \
|
||||
-p \
|
||||
-r --rmdeps \
|
||||
-s --syncdeps \
|
||||
-p -w' -- $cur ) )
|
||||
-S --usesudo \
|
||||
--noconfirm \
|
||||
--noprogressbar' -- $cur ) )
|
||||
fi
|
||||
|
||||
rem_selected
|
||||
@ -131,7 +132,6 @@ _makepkg ()
|
||||
complete -o default -F _makepkg makepkg
|
||||
|
||||
## pacman completion
|
||||
#
|
||||
|
||||
_instring ()
|
||||
{
|
||||
@ -233,10 +233,13 @@ _pacman ()
|
||||
-h --help \
|
||||
--config \
|
||||
--noconfirm \
|
||||
--ask \
|
||||
--noprogressbar \
|
||||
--noscriptlet \
|
||||
-v --verbose \
|
||||
-r --root \
|
||||
-b --dbpath \
|
||||
--cachedir \
|
||||
' -- $cur ) )
|
||||
return 0
|
||||
;;
|
||||
@ -251,10 +254,13 @@ _pacman ()
|
||||
-s --recursive \
|
||||
--config \
|
||||
--noconfirm \
|
||||
--ask \
|
||||
--noprogressbar \
|
||||
--noscriptlet \
|
||||
-v --verbose \
|
||||
-r --root \
|
||||
-b --dbpath \
|
||||
--cachedir \
|
||||
' -- $cur ) )
|
||||
return 0
|
||||
;;
|
||||
@ -262,6 +268,7 @@ _pacman ()
|
||||
COMPREPLY=( $( compgen -W '\
|
||||
-c --clean \
|
||||
-d --nodeps \
|
||||
-e --dependsonly \
|
||||
-f --force \
|
||||
-g --groups \
|
||||
-h --help \
|
||||
@ -272,17 +279,22 @@ _pacman ()
|
||||
-u --sysupgrade \
|
||||
-w --downloadonly \
|
||||
-y --refresh \
|
||||
--ignore \
|
||||
--config \
|
||||
--noconfirm \
|
||||
--ask \
|
||||
--noprogressbar \
|
||||
--noscriptlet \
|
||||
-v --verbose \
|
||||
-r --root \
|
||||
-b --dbpath \
|
||||
--cachedir \
|
||||
' -- $cur ) )
|
||||
return 0
|
||||
;;
|
||||
Q)
|
||||
COMPREPLY=( $( compgen -W '\
|
||||
-c --changelog \
|
||||
-e --orphans \
|
||||
-g --groups \
|
||||
-h --help \
|
||||
@ -294,10 +306,13 @@ _pacman ()
|
||||
-s --search \
|
||||
--config \
|
||||
--noconfirm \
|
||||
--ask \
|
||||
--noprogressbar \
|
||||
--noscriptlet \
|
||||
-v --verbose \
|
||||
-r --root \
|
||||
-b --dbpath \
|
||||
--cachedir \
|
||||
' -- $cur ) )
|
||||
return 0
|
||||
;;
|
||||
|
@ -241,7 +241,7 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, alpm_list_t *targ,
|
||||
}
|
||||
}
|
||||
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);
|
||||
} else if(needbackup) {
|
||||
/* 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) {
|
||||
printf(_("usage: %s {-S --sync} [options] [package]\n"), myname);
|
||||
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(_(" -e, --dependsonly install dependencies only\n"));
|
||||
printf(_(" -f, --force force install, overwrite conflicting files\n"));
|
||||
|
Loading…
Reference in New Issue
Block a user