diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-03T13·56+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-03T14·35+0200 |
commit | 88c07341a6bf99f923cb3d6487b72afc025b7746 (patch) | |
tree | 4a2f0d8abbfbb33f2cbe465724efa221381945c9 /src/libexpr | |
parent | 07a08bddf001271b4b7eff2a119c395f40119966 (diff) |
nix-env: Use wildcard match by default
That is, you don't need to pass '*' anymore, so nix-env -qa is equivalent to nix-env -qa '*'
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/names.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libexpr/names.cc b/src/libexpr/names.cc index 29c7ddb4d70f..781c2b6468f9 100644 --- a/src/libexpr/names.cc +++ b/src/libexpr/names.cc @@ -55,7 +55,7 @@ static string nextComponent(string::const_iterator & p, else while (p != end && (!isdigit(*p) && *p != '.' && *p != '-')) s += *p++; - + return s; } @@ -80,7 +80,7 @@ int compareVersions(const string & v1, const string & v2) { string::const_iterator p1 = v1.begin(); string::const_iterator p2 = v2.begin(); - + while (p1 != v1.end() || p2 != v2.end()) { string c1 = nextComponent(p1, v1.end()); string c2 = nextComponent(p2, v2.end()); @@ -95,11 +95,10 @@ int compareVersions(const string & v1, const string & v2) DrvNames drvNamesFromArgs(const Strings & opArgs) { DrvNames result; - for (Strings::const_iterator i = opArgs.begin(); - i != opArgs.end(); ++i) + foreach (Strings::const_iterator, i, opArgs) result.push_back(DrvName(*i)); return result; } - + } |