[Bash-completion-devel] [bash-completion-Bugs][313638] DBTS 673235: aptitude safe-upgrade accepts package names
bash-completion-bugs at alioth.debian.org
bash-completion-bugs at alioth.debian.org
Thu May 17 08:03:21 UTC 2012
Bugs item #313638, was opened at 17/05/2012 08:03
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313638&group_id=100114
Status: Open
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: DBTS 673235: aptitude safe-upgrade accepts package names
Distribution: Debian
Originally reported in: Debian BTS
Milestone: 2.0
Status: None
Original bug number: 673235
Initial Comment:
Hi,
aptitude safe-upgrade accepts package names as parameters, the following patch enable bash completion for it :
--- a/completions/aptitude 2012-05-17 09:33:19.449845569 +0200
+++ b/completions/aptitude 2012-05-17 09:39:49.229833983 +0200
@@ -28,7 +28,7 @@
local special i
for (( i=0; i < ${#words[@]}-1; i++ )); do
- if [[ ${words[i]} == @(@(|re)install|@(|un)hold|@(|un)markauto|@(dist|full)-upgrade|download|show|forbid-version|purge|remove|changelog|why@(|-not)|keep@(|-all)|build-dep|@(add|remove)-user-tag|versions) ]]; then
+ if [[ ${words[i]} == @(@(|re)install|@(|un)hold|@(|un)markauto|@(dist|full|safe)-upgrade|download|show|forbid-version|purge|remove|changelog|why@(|-not)|keep@(|-all)|build-dep|@(add|remove)-user-tag|versions) ]]; then
special=${words[i]}
fi
#exclude some mutually exclusive options
@@ -40,7 +40,7 @@
case $special in
install|hold|markauto|unmarkauto|dist-upgrade|full-upgrade| \
download|show|changelog|why|why-not|build-dep|add-user-tag| \
- remove-user-tag|versions)
+ remove-user-tag|versions|safe-upgrade)
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
return 0
;;
@@ -58,7 +58,7 @@
case $prev in
# don't complete anything if these options are found
- autoclean|clean|forget-new|search|safe-upgrade|upgrade|update|keep-all)
+ autoclean|clean|forget-new|search|upgrade|update|keep-all)
return 0
;;
-S)
Regards,
Nicolas
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313638&group_id=100114
More information about the Bash-completion-devel
mailing list