| Summary: | urpmi: prevent autocompletion if the argument to complete is empty | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Rémi Verschelde <rverschelde> |
| Component: | RPM Packages | Assignee: | Mageia tools maintainers <mageiatools> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Low | CC: | guillomovitch, thierry.vignaud |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | bash-completion, urpmi | CVE: | |
| Status comment: | |||
|
Description
Rémi Verschelde
2015-05-24 18:13:05 CEST
Rémi Verschelde
2015-05-24 18:13:36 CEST
CC:
(none) =>
thierry.vignaud
Rémi Verschelde
2015-05-24 18:17:13 CEST
Priority:
Normal =>
Low
Thierry Vignaud
2015-05-25 17:37:08 CEST
Source RPM:
urpmi =>
bash-completion, urpmi
Thierry Vignaud
2015-05-25 17:37:15 CEST
Hardware:
i586 =>
All Guillaume, any though on how to do that? CC:
(none) =>
guillomovitch The following line in _urpmi_package function should be enough:
[ -z $cur ] && return 0
However, I don't think it would be very wise to introduce such kind of hardcoded trick in a specific completion. A configurable completion treshold, defined in a COMP_URPMI_TRESHOLD environment variable, would a be better option:
[[ ${#cur} -lt $COMP_URPMI_TRESHOLD ]] && return 0
(In reply to Guillaume Rousse from comment #2) > > However, I don't think it would be very wise to introduce such kind of > hardcoded trick in a specific completion. A configurable completion > treshold, defined in a COMP_URPMI_TRESHOLD environment variable, would a be > better option: > > [[ ${#cur} -lt $COMP_URPMI_TRESHOLD ]] && return 0 That sounds like a good plan to me. Which package should define this variable? urpmi? packages don't define variables, they just install files. Just document it somewhere in urpmi READMI file.
Samuel Verschelde
2016-11-01 12:51:55 CET
Assignee:
bugsquad =>
mageiatools |