From 26a255479b1b8cd15789a8bffaa0c37a96edc7e5 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 25 Feb 2008 15:24:46 +0000 Subject: - bash-completion: o restore available-pkgs completion using "urpmq --list" (guillomovitch) (but only if COMP_URPMI_HDLISTS is set since it's slow) --- NEWS | 3 +++ urpmi.bash-completion | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 7d8eaccb..d82678cd 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,9 @@ - urpmi: o do not say "files are missing" when the downloaded rpm is corrupted o --test: only display "Installation is possible" when it is the case (#29837) +- bash-completion: + o restore available-pkgs completion using "urpmq --list" (guillomovitch) + (but only if COMP_URPMI_HDLISTS is set since it's slow) Version 5.5 - 23 February 2008, by Pascal "Pixel" Rigaux diff --git a/urpmi.bash-completion b/urpmi.bash-completion index 41449699..47aa8d67 100644 --- a/urpmi.bash-completion +++ b/urpmi.bash-completion @@ -91,7 +91,9 @@ _urpmi() COMPREPLY=( $( compgen -W "$options" -- $cur ) ) else if [[ ${COMP_WORDS[0]} != *rurpmi ]]; then - # return rpm files (can't list available packages anymore) + if [ -n "${COMP_URPMI_HDLISTS:-}" ]; then + COMPREPLY=( $( compgen -W "$(urpmq --list)" -- $cur ) ) + fi _filedir rpm fi fi -- cgit v1.2.1