Mageia Bugzilla – Attachment 110 Details for
Bug 373
add some more completions to urpmi
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to apply the proposed changes
urpmi-completion.patch (text/plain), 1.46 KB, created by
Ahmad Samir
on 2011-03-15 00:39:39 CET
(
hide
)
Description:
Patch to apply the proposed changes
Filename:
MIME Type:
Creator:
Ahmad Samir
Created:
2011-03-15 00:39:39 CET
Size:
1.46 KB
patch
obsolete
>--- urpmi.orig 2011-03-15 01:18:49.310079422 +0200 >+++ urpmi 2011-03-15 01:31:02.197329086 +0200 >@@ -29,21 +29,22 @@ > _urpmi_packages() > { > local options >- >+ if [ -n "${COMP_URPMI_PACKAGES:-}" ]; then > # find media selection options >- for (( i=1; i < COMP_CWORD; i++ )); do >- case "${COMP_WORDS[i]}" in >- --@\(excludemedia|media\)) >- options="$options ${COMP_WORDS[i]} ${COMP_WORDS[i+1]}" >- i=$(($i+1)) >- ;; >- --update) >- options="$options ${COMP_WORDS[i]}" >- ;; >- esac >- done >+ for (( i=1; i < COMP_CWORD; i++ )); do >+ case "${COMP_WORDS[i]}" in >+ --@\(excludemedia|media\)) >+ options="$options ${COMP_WORDS[i]} ${COMP_WORDS[i+1]}" >+ i=$(($i+1)) >+ ;; >+ --update) >+ options="$options ${COMP_WORDS[i]}" >+ ;; >+ esac >+ done > >- COMPREPLY=( $( compgen -W "$(urpmq $options --list)" -- $cur ) ) >+ COMPREPLY=( $( compgen -W "$(urpmq $options --list)" -- $cur ) ) >+ fi > } > > # urpmi completion >@@ -69,6 +70,10 @@ > _urpmi_medias > return 0 > ;; >+ --searchmedia) >+ _urpmi_medias >+ return 0 >+ ;; > --parallel) > _urpmi_aliases > return 0 >@@ -97,7 +102,7 @@ > options="$options --root --use-distrib --env \ > --auto-orphans --replacepkgs --justdb \ > --allow-nodeps --allow-force --no-suggests --force \ >- --noscripts --auto-update --keep --nokeep \ >+ --noscripts --auto-update --keep --nokeep --replacefiles \ > --verify-rpm" > for (( i=1; i < COMP_CWORD; i++ )); do > case ${COMP_WORDS[i]} in
--- urpmi.orig 2011-03-15 01:18:49.310079422 +0200 +++ urpmi 2011-03-15 01:31:02.197329086 +0200 @@ -29,21 +29,22 @@ _urpmi_packages() { local options - + if [ -n "${COMP_URPMI_PACKAGES:-}" ]; then # find media selection options - for (( i=1; i < COMP_CWORD; i++ )); do - case "${COMP_WORDS[i]}" in - --@\(excludemedia|media\)) - options="$options ${COMP_WORDS[i]} ${COMP_WORDS[i+1]}" - i=$(($i+1)) - ;; - --update) - options="$options ${COMP_WORDS[i]}" - ;; - esac - done + for (( i=1; i < COMP_CWORD; i++ )); do + case "${COMP_WORDS[i]}" in + --@\(excludemedia|media\)) + options="$options ${COMP_WORDS[i]} ${COMP_WORDS[i+1]}" + i=$(($i+1)) + ;; + --update) + options="$options ${COMP_WORDS[i]}" + ;; + esac + done - COMPREPLY=( $( compgen -W "$(urpmq $options --list)" -- $cur ) ) + COMPREPLY=( $( compgen -W "$(urpmq $options --list)" -- $cur ) ) + fi } # urpmi completion @@ -69,6 +70,10 @@ _urpmi_medias return 0 ;; + --searchmedia) + _urpmi_medias + return 0 + ;; --parallel) _urpmi_aliases return 0 @@ -97,7 +102,7 @@ options="$options --root --use-distrib --env \ --auto-orphans --replacepkgs --justdb \ --allow-nodeps --allow-force --no-suggests --force \ - --noscripts --auto-update --keep --nokeep \ + --noscripts --auto-update --keep --nokeep --replacefiles \ --verify-rpm" for (( i=1; i < COMP_CWORD; i++ )); do case ${COMP_WORDS[i]} in
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 373
: 110