[Yum-devel] Offering nvra instead of na completions from bash completion helper

James Antill james at fedoraproject.org
Thu Oct 25 20:24:56 UTC 2012


On Thu, 2012-10-25 at 21:53 +0300, Ville Skyttä wrote:
> On 2012-10-25 20:48, James Antill wrote:
> > On Thu, 2012-10-25 at 00:12 +0300, Ville Skyttä wrote:
> >> Hello,
> >>
> >> completion-helper's suggestions aren't that useful in scenarios where
> >> multiple versions of packages are available/installed, for example when
> >> completing kernel(-devel) packages to remove etc. The fix should be
> >> easy, but the full nvra makes completion suggestions generally uglier
> >> than they were.
> >>
> >> So... thoughts/objections about the attached patch?
> > 
> >  Ideally we'd have the full list for all seven possibilities, I assume
> > that's too slow?
> 
> Dunno, but I sure wouldn't like the sheer number of completions offered
> if that was the case.
> 
> > Have you tried just the four of: n, na, nvra, nevra?
> >  If we can only have one then nvra seems like it'd be the most useful,
> > but possibly _look_ worst most of the time.
> 
> n and na are redundant with nvra, anything without arch is IMO a no go
> given that multiarch setups are that common these days

 Kind of, if you have nvra you can kind of specify the same thing as n
or na (there are some edge cases where it's not identical) ... but it's
much more cumbersome. Generally I want to do:

yum remove yum-plugin-protectbase

...and not:

yum remove yum-plugin-protectbase-1.1.3N-4.fcXY.noarch

...and if the completion just offered me the later I'd be annoyed, and
think it was ugly esp. if there are multiple versions so bash gives me:

yum remove yum-plugin-protectbase-1.1.3N-[_]

...and I have to delete a character or choose which release completion I
want.

> , and nevra output
> doesn't actually work for (some?) Epoch: 0/missing cases:
>
> # yum remove bash-0:4.2.37-2.fc17.x86_64
> No Match for argument: bash-0:4.2.37-2.fc17.x86_64

 Ugh, this looks like it's been broken since we fixed it for envra and
it's the same simple fix ... sigh, fixed now.

> ...and besides, I think it's rare enough to have two nevras in scope
> that differ only by e that we can just forget about it wrt completions.
> 
> So IMNSHO there should be only one, either na (like it is now) or nvra.
> Given that you seem to be leaning towards nvra too, I'll push this soonish.

 Yeh, if we can only have one I guess nvra is better ... for those few
times we want/need to specify a version, but it feels like the common
case would get less nice.



More information about the Yum-devel mailing list