diff --git a/source/app.d b/source/app.d index 4a15f70..67bb904 100644 --- a/source/app.d +++ b/source/app.d @@ -168,9 +168,14 @@ dub.removeLocalPackage(args[1], install_system); break; case "list-locals": - logInfo("Locals:"); + case "list-system": + case "list-user": + auto toList = cmd == "list-locals"? InstallLocation.local + : cmd == "list-system"? InstallLocation.systemWide + : InstallLocation.userWide; + logInfo(cmd == "list-locals"? "Locals:" : cmd == "list-system"? "System:" : "User:"); foreach( p; dub.packageManager.getPackageIterator() ) - if( p.installLocation == InstallLocation.local ) + if( p.installLocation == toList) logInfo(" %s %s: %s", p.name, p.ver, p.path.toNativeString()); logInfo(""); break; @@ -307,6 +312,8 @@ Adds a local package directory (e.g. a git repository) remove-local Removes a local package directory list-locals Prints a list of all locals + list-system Prints a list of all system wide installed packages. + list-user Prints a list of all user installed packages. generate Generates project files using the specified generator: visuald, mono-d, build, rdmd