Lines 87-92
_pkgname()
Link Here
|
87 |
only=1 |
87 |
only=1 |
88 |
_pkgname_only ${cur} @GENTOO_PORTAGE_EPREFIX@/var/db/pkg |
88 |
_pkgname_only ${cur} @GENTOO_PORTAGE_EPREFIX@/var/db/pkg |
89 |
fi |
89 |
fi |
|
|
90 |
# 'equery' wants an '=' in front of specific package versions. |
91 |
# Add it if there is only one selected package and it isn't there already. |
92 |
if [[ ${#COMPREPLY[@]} == 1 && ${prev} != "=" ]] |
93 |
then |
94 |
[[ -z "${only}" ]] && COMPREPLY=("="$COMPREPLY) |
95 |
fi |
90 |
;; |
96 |
;; |
91 |
-A) |
97 |
-A) |
92 |
# Complete either the category or the complete package name |
98 |
# Complete either the category or the complete package name |
Lines 154-165
_pkgname()
Link Here
|
154 |
# Somebody screwed up! :-) |
160 |
# Somebody screwed up! :-) |
155 |
;; |
161 |
;; |
156 |
esac |
162 |
esac |
157 |
# 'equery' wants an '=' in front of specific package versions. |
|
|
158 |
# Add it if there is only one selected package and it isn't there already. |
159 |
if [[ ${#COMPREPLY[@]} == 1 && ${prev} != "=" ]] |
160 |
then |
161 |
[[ -z "${only}" ]] && COMPREPLY=("="$COMPREPLY) |
162 |
fi |
163 |
} |
163 |
} |
164 |
|
164 |
|
165 |
# |
165 |
# |
Lines 1144-1150
_equery()
Link Here
|
1144 |
;; |
1144 |
;; |
1145 |
c?(hanges)) |
1145 |
c?(hanges)) |
1146 |
# Complete package name only if it is not yet supplied. |
1146 |
# Complete package name only if it is not yet supplied. |
1147 |
if [[ ${prev} == ${mode} ]]; then |
1147 |
if [[ ${prev} == ${mode} || ${prev} == '=' ]]; then |
1148 |
case $cur in |
1148 |
case $cur in |
1149 |
-*) |
1149 |
-*) |
1150 |
COMPREPLY=($(compgen -W "-h --help" -- $cur)) |
1150 |
COMPREPLY=($(compgen -W "-h --help" -- $cur)) |
Lines 1195-1201
_equery()
Link Here
|
1195 |
y|keywords) |
1195 |
y|keywords) |
1196 |
# Only complete if the previous entry on the command line is not |
1196 |
# Only complete if the previous entry on the command line is not |
1197 |
# a package name. |
1197 |
# a package name. |
1198 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1198 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then |
1199 |
case "${cur}" in |
1199 |
case "${cur}" in |
1200 |
-*) |
1200 |
-*) |
1201 |
COMPREPLY=($(compgen -W "-h --help -v --version -a --arch -A |
1201 |
COMPREPLY=($(compgen -W "-h --help -v --version -a --arch -A |
Lines 1211-1217
_equery()
Link Here
|
1211 |
l?(ist)) |
1211 |
l?(ist)) |
1212 |
# Only complete if the previous entry on the command line is not |
1212 |
# Only complete if the previous entry on the command line is not |
1213 |
# a package name. |
1213 |
# a package name. |
1214 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1214 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then |
1215 |
case "${cur}" in |
1215 |
case "${cur}" in |
1216 |
-*) |
1216 |
-*) |
1217 |
COMPREPLY=($(compgen -W "-h --help -d --duplicates -b |
1217 |
COMPREPLY=($(compgen -W "-h --help -d --duplicates -b |
Lines 1232-1238
_equery()
Link Here
|
1232 |
b?(elongs)) |
1232 |
b?(elongs)) |
1233 |
# Only complete if the previous entry on the command line is not |
1233 |
# Only complete if the previous entry on the command line is not |
1234 |
# a file name. |
1234 |
# a file name. |
1235 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1235 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then |
1236 |
case $cur in |
1236 |
case $cur in |
1237 |
-*) |
1237 |
-*) |
1238 |
COMPREPLY=($(compgen -W "-h --help -f --full-regex -e |
1238 |
COMPREPLY=($(compgen -W "-h --help -f --full-regex -e |
Lines 1248-1254
_equery()
Link Here
|
1248 |
u?(ses)) |
1248 |
u?(ses)) |
1249 |
# Only complete if the previous entry on the command line is not |
1249 |
# Only complete if the previous entry on the command line is not |
1250 |
# a package name. |
1250 |
# a package name. |
1251 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1251 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then |
1252 |
case $cur in |
1252 |
case $cur in |
1253 |
-*) |
1253 |
-*) |
1254 |
COMPREPLY=($(compgen -W "-h --help -a --all" -- $cur)) |
1254 |
COMPREPLY=($(compgen -W "-h --help -a --all" -- $cur)) |
Lines 1263-1269
_equery()
Link Here
|
1263 |
w?(hich)) |
1263 |
w?(hich)) |
1264 |
# Only complete if the previous entry on the command line is not |
1264 |
# Only complete if the previous entry on the command line is not |
1265 |
# a package name. |
1265 |
# a package name. |
1266 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1266 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then |
1267 |
case $cur in |
1267 |
case $cur in |
1268 |
-*) |
1268 |
-*) |
1269 |
COMPREPLY=($(compgen -W "-h --help -m --include-masked" -- $cur)) |
1269 |
COMPREPLY=($(compgen -W "-h --help -m --include-masked" -- $cur)) |
Lines 1278-1284
_equery()
Link Here
|
1278 |
g|depgraph) |
1278 |
g|depgraph) |
1279 |
# Only complete if the previous entry on the command line is not |
1279 |
# Only complete if the previous entry on the command line is not |
1280 |
# a package name. |
1280 |
# a package name. |
1281 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1281 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then |
1282 |
case $cur in |
1282 |
case $cur in |
1283 |
-*) |
1283 |
-*) |
1284 |
COMPREPLY=($(compgen -W "-h --help -A --no-atom -M --no-mask -U |
1284 |
COMPREPLY=($(compgen -W "-h --help -A --no-atom -M --no-mask -U |
Lines 1294-1300
_equery()
Link Here
|
1294 |
d?(epends)) |
1294 |
d?(epends)) |
1295 |
# Only complete if the previous entry on the command line is not |
1295 |
# Only complete if the previous entry on the command line is not |
1296 |
# a package name. |
1296 |
# a package name. |
1297 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1297 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then |
1298 |
case $cur in |
1298 |
case $cur in |
1299 |
-*) |
1299 |
-*) |
1300 |
COMPREPLY=($(compgen -W "-h --help -a --all-packages -D |
1300 |
COMPREPLY=($(compgen -W "-h --help -a --all-packages -D |
Lines 1318-1331
_equery()
Link Here
|
1318 |
m?(eta)) |
1318 |
m?(eta)) |
1319 |
# Only complete if the previous entry on the command line is not |
1319 |
# Only complete if the previous entry on the command line is not |
1320 |
# a package name. |
1320 |
# a package name. |
1321 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1321 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then |
1322 |
_equery_meta $cur |
1322 |
_equery_meta $cur |
1323 |
fi |
1323 |
fi |
1324 |
;; |
1324 |
;; |
1325 |
k|check) |
1325 |
k|check) |
1326 |
# Only complete if the previous entry on the command line is not |
1326 |
# Only complete if the previous entry on the command line is not |
1327 |
# a package name. |
1327 |
# a package name. |
1328 |
if [[ ${prev} == ${mode} ]]; then |
1328 |
if [[ ${prev} == ${mode} || ${prev} == '=' ]]; then |
1329 |
case $cur in |
1329 |
case $cur in |
1330 |
-*) |
1330 |
-*) |
1331 |
COMPREPLY=($(compgen -W "${COMPREPLY[@]} -h --help -f |
1331 |
COMPREPLY=($(compgen -W "${COMPREPLY[@]} -h --help -f |
Lines 1341-1347
_equery()
Link Here
|
1341 |
s?(ize)) |
1341 |
s?(ize)) |
1342 |
# Only complete if the previous entry on the command line is not |
1342 |
# Only complete if the previous entry on the command line is not |
1343 |
# a package name. |
1343 |
# a package name. |
1344 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1344 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then |
1345 |
case $cur in |
1345 |
case $cur in |
1346 |
-*) |
1346 |
-*) |
1347 |
COMPREPLY=($(compgen -W "-h --help -b --bytes -f |
1347 |
COMPREPLY=($(compgen -W "-h --help -b --bytes -f |
1348 |
- |
|
|