Lines 1177-1207
_equery()
Link Here
|
1177 |
b?(elongs)) |
1177 |
b?(elongs)) |
1178 |
# Only complete if the previous entry on the command line is not |
1178 |
# Only complete if the previous entry on the command line is not |
1179 |
# a file name. |
1179 |
# a file name. |
1180 |
if \ |
1180 |
if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then |
1181 |
[[ \ |
1181 |
case $cur in |
1182 |
${prev} == ${mode} || \ |
1182 |
-*) |
1183 |
${prev:0:1} == "-" || \ |
1183 |
COMPREPLY=($(compgen -W "-h --help -f --full-regex -e |
1184 |
${COMP_WORDS[COMP_CWORD-2]} == "-c" || \ |
1184 |
--early-out -n --name-only" -- $cur)) |
1185 |
${COMP_WORDS[COMP_CWORD-2]} == "--category" \ |
1185 |
;; |
1186 |
]] && \ |
1186 |
*) |
1187 |
[[ \ |
1187 |
COMPREPLY=($(compgen -f -- $cur) \ |
1188 |
${prev} != "-c" && \ |
1188 |
$(compgen -d -S '/' -- $cur)) |
1189 |
${prev} != "--category" \ |
1189 |
;; |
1190 |
]] |
1190 |
esac |
1191 |
then |
|
|
1192 |
case $cur in |
1193 |
-*) |
1194 |
COMPREPLY=($(compgen -W "-h --help -f --full-regex -e |
1195 |
--early-out -n --name-only" -- $cur)) |
1196 |
;; |
1197 |
*) |
1198 |
COMPREPLY=($(compgen -f -- $cur) \ |
1199 |
$(compgen -d -S '/' -- $cur)) |
1200 |
;; |
1201 |
esac |
1202 |
# Are we completing a category? |
1203 |
elif [[ ${prev} == "-c" || ${prev} == "--category" ]]; then |
1204 |
COMPREPLY=($(builtin cd ${portdir}/metadata/cache; compgen -W "$(compgen -G '*')" -- $cur)) |
1205 |
fi |
1191 |
fi |
1206 |
;; |
1192 |
;; |
1207 |
u?(ses)) |
1193 |
u?(ses)) |
1208 |
- |
|
|