aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/command.hh
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-02-18 13:19:57 +0100
committerNaïm Favier <n@monade.li>2022-03-07 12:01:54 +0100
commit7f5cf87d563a6f8b756c4ef985a6cc5b3b9dbcf6 (patch)
tree1899332c960ee80040f577d5cc13f51741d88b6a /src/libcmd/command.hh
parentc28e2b1b2982451bafee9afede094affb08ea130 (diff)
Accept and discard fragments in getFlakeRefForCompletion
Otherwise trying to complete `nix build foo#bar --update-input <Tab>` fails with "unexpected fragment"
Diffstat (limited to 'src/libcmd/command.hh')
-rw-r--r--src/libcmd/command.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcmd/command.hh b/src/libcmd/command.hh
index 0f6125f11..f1ef9e69c 100644
--- a/src/libcmd/command.hh
+++ b/src/libcmd/command.hh
@@ -134,7 +134,7 @@ struct InstallableCommand : virtual Args, SourceExprCommand
std::optional<FlakeRef> getFlakeRefForCompletion() override
{
- return parseFlakeRef(_installable, absPath("."));
+ return parseFlakeRefWithFragment(_installable, absPath(".")).first;
}
private: