diff options
Diffstat (limited to 'src/nix-env/main.cc')
-rw-r--r-- | src/nix-env/main.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index 6aa342c1daff..5ef61bb306a0 100644 --- a/src/nix-env/main.cc +++ b/src/nix-env/main.cc @@ -480,15 +480,17 @@ static void opListGenerations(Globals & globals, if (opArgs.size() != 0) throw UsageError(format("no arguments expected")); - Generations gens = findGenerations(globals.profile); + int curGen; + Generations gens = findGenerations(globals.profile, curGen); for (Generations::iterator i = gens.begin(); i != gens.end(); ++i) { tm t; if (!localtime_r(&i->creationTime, &t)) throw Error("cannot convert time"); - cout << format("%|4| %|4|-%|02|-%|02| %|02|:%|02|:%|02|\n") + cout << format("%|4| %|4|-%|02|-%|02| %|02|:%|02|:%|02| %||\n") % i->number % (t.tm_year + 1900) % (t.tm_mon + 1) % t.tm_mday - % t.tm_hour % t.tm_min % t.tm_sec; + % t.tm_hour % t.tm_min % t.tm_sec + % (i->number == curGen ? "(current)" : ""); } } |