diff options
author | Guillaume Rousse <guillomovitch@mandriva.org> | 2006-07-31 08:31:42 +0000 |
---|---|---|
committer | Guillaume Rousse <guillomovitch@mandriva.org> | 2006-07-31 08:31:42 +0000 |
commit | a576b61c4542b4f7f2d826f33baf4de8de935f76 (patch) | |
tree | 14ee2b66b9d98a128b2fd8dceaa0d1a95ead1d39 | |
parent | 8141da5c1cbd1ddfc868dbdd562125de594120f0 (diff) | |
download | urpmi-a576b61c4542b4f7f2d826f33baf4de8de935f76.tar urpmi-a576b61c4542b4f7f2d826f33baf4de8de935f76.tar.gz urpmi-a576b61c4542b4f7f2d826f33baf4de8de935f76.tar.bz2 urpmi-a576b61c4542b4f7f2d826f33baf4de8de935f76.tar.xz urpmi-a576b61c4542b4f7f2d826f33baf4de8de935f76.zip |
add rurpmi completion
-rw-r--r-- | urpmi.bash-completion | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/urpmi.bash-completion b/urpmi.bash-completion index b78900c9..d6bf23e4 100644 --- a/urpmi.bash-completion +++ b/urpmi.bash-completion @@ -93,25 +93,38 @@ _urpmi() if [[ "$cur" == -* ]]; then # return list of available options COMPREPLY=( $( compgen -W '-a -p -P -y -s -q -v -h --help \ - --update --media --excludemedia --sortmedia --synthesis \ - --auto --auto-select --auto-update --no-uninstall --keep --split-level \ - --split-length --fuzzy --src --install-src --clean \ - --noclean --force --allow-nodeps --allow-force --parallel \ - --wget --curl --limit-rate --proxy --proxy-user --bug \ - --env --verify-rpm --no-verify-rpm --no-install \ - --test --excludepath --excludedocs --root --norebuild \ - --searchmedia --noscripts --ignoresize --ignorearch \ - --strict-arch --use-distrib --wget-options --curl-options \ - --rsync-options --resume --retry --skip --nolock --more-choices' -- $cur ) ) + --update --media --excludemedia --sortmedia \ + --synthesis --auto --auto-select --no-uninstall \ + --split-level --split-length --fuzzy --src \ + --install-src --clean --noclean --parallel --wget \ + --curl --limit-rate --proxy --proxy-user --bug \ + --no-verify-rpm --no-install --test --excludepath \ + --excludedocs --searchmedia --ignoresize --ignorearch \ + --strict-arch --wget-options --curl-options \ + --rsync-options --resume --retry --skip --nolock \ + --more-choices' -- $cur ) ) + # add dangereous option for everything else as rurpmi + if [[ ${COMP_WORDS[0]} != *rurpmi ]]; then + COMPREPLY=( $( compgen -W '${COMPREPLY[@]} --root \ + --use-distrib --env --allow-nodeps \ + --allow-force --force --noscripts \ + --auto-update --keep --verify-rpm --norebuild' \ + -- $cur ) ) + fi else - # return available packages (unless it is clearly a file) and rpm files - if [[ "$cur" != */* ]]; then + # return available packages only + if [[ ${COMP_WORDS[0]} == *rurpmi ]]; then _urpmi_packages + else + # return available packages (unless it is clearly a file) and rpm files + if [[ "$cur" != */* ]]; then + _urpmi_packages + fi + _filedir rpm fi - _filedir rpm fi } -complete -F _urpmi urpmi gurpmi +complete -F _urpmi urpmi gurpmi rurpmi # urpmq completion # |