* In `nix-env -q', sort derivations by name *without* case
sensitivity.
This commit is contained in:
parent
febd8bed1b
commit
d830b2c1df
|
@ -465,9 +465,17 @@ static void opUninstall(Globals & globals,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static bool cmpChars(char a, char b)
|
||||||
|
{
|
||||||
|
return toupper(a) < toupper(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool cmpDrvByName(const DrvInfo & a, const DrvInfo & b)
|
static bool cmpDrvByName(const DrvInfo & a, const DrvInfo & b)
|
||||||
{
|
{
|
||||||
return a.name < b.name;
|
return lexicographical_compare(
|
||||||
|
a.name.begin(), a.name.end(),
|
||||||
|
b.name.begin(), b.name.end(), cmpChars);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue