aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nix/why-depends.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/nix/why-depends.cc b/src/nix/why-depends.cc
index 2f6b361bb..e27f56ef5 100644
--- a/src/nix/why-depends.cc
+++ b/src/nix/why-depends.cc
@@ -34,8 +34,21 @@ struct CmdWhyDepends : SourceExprCommand
CmdWhyDepends()
{
- expectArg("package", &_package);
- expectArg("dependency", &_dependency);
+ expectArgs({
+ .label = "package",
+ .handler = {&_package},
+ .completer = {[&](size_t, std::string_view prefix) {
+ completeInstallable(prefix);
+ }}
+ });
+
+ expectArgs({
+ .label = "dependency",
+ .handler = {&_dependency},
+ .completer = {[&](size_t, std::string_view prefix) {
+ completeInstallable(prefix);
+ }}
+ });
addFlag({
.longName = "all",