Description of problem: urpmi bash completion trust aliases of sed and grep where it shouldn't. A possible fix would be to force Please change line 11 in /etc/bash_completion.d/urpmi to : | \sed -e 's/(/\\(/g' -e 's/)/\\)/g' -e 's/ /\\ /g' ) ) Please change line 27 in /etc/bash_completion.d/urpmi to : | \grep "^${cur//\\\\/}" ` ) Please change line 48 in /etc/bash_completion.d/urpmi to : COMPREPLY=( $( compgen -W "$(urpmq $options --list | \grep ^$cur )" -- ) ) The backslash will disable any alias on sed or grep. An unalias sed 2>/dev/null or unalias grep 2>/dev/null is an other option. Version-Release number of selected component (if applicable): urpmi-8.105-1.mga6 How reproducible: Always Steps to Reproduce: 1. echo "alias grep='grep --color=always'" >> ~/.bashrc 2. . ~/.bashrc 3. urpmi varni<tab> 4. urpmi ^[[01;31m^[[Kvarni^[[m^[[Ksh
Assignee: bugsquad => mageiatoolsSeverity: normal => minor
Created attachment 8920 [details] Fix urpmi completion script to skip grep and sed aliases.
Keywords: (none) => PATCH
commit 257cc397753fc1b669e7cc8c5435d7f11202847a Author: Nicolas Lécureuil <neoclust@...> Date: Wed Feb 1 10:46:59 2017 +0100 Fix bash completion to not trust aliases (mga#19894) Patch from rapsys --- Commit Link: http://gitweb.mageia.org/software/rpm/urpmi/commit/?id=257cc397753fc1b669e7cc8c5435d7f11202847a
tested and works OK for me
Status: NEW => RESOLVEDCC: (none) => mageiaResolution: (none) => FIXED