diff --git a/completers/nix_completer/cmd/build.go b/completers/nix_completer/cmd/build.go index 5125c9f2d5..76331b1d5e 100644 --- a/completers/nix_completer/cmd/build.go +++ b/completers/nix_completer/cmd/build.go @@ -41,6 +41,9 @@ func init() { }) carapace.Gen(buildCmd).PositionalCompletion( - nix.ActionFlakeRefs(), + carapace.Batch( + carapace.ActionDirectories(), + nix.ActionFlakeRefs(), + ).ToA(), ) } diff --git a/completers/nix_completer/cmd/develop.go b/completers/nix_completer/cmd/develop.go index a4d0c56eb6..186c2ccdce 100644 --- a/completers/nix_completer/cmd/develop.go +++ b/completers/nix_completer/cmd/develop.go @@ -52,6 +52,9 @@ func init() { }) carapace.Gen(developCmd).PositionalCompletion( - nix.ActionFlakeRefs(), + carapace.Batch( + carapace.ActionDirectories(), + nix.ActionFlakeRefs(), + ).ToA(), ) } diff --git a/pkg/actions/tools/nix/flake.go b/pkg/actions/tools/nix/flake.go index ac3a290a43..acf2ea148b 100644 --- a/pkg/actions/tools/nix/flake.go +++ b/pkg/actions/tools/nix/flake.go @@ -128,7 +128,6 @@ func ActionFlakeRefs() carapace.Action { return carapace.ActionMultiPartsN("#", 2, func(c carapace.Context) carapace.Action { switch len(c.Parts) { case 0: - // TODO add directory completion externally return ActionFlakes().Suffix("#") default: return ActionFlakeAttributes(c.Parts[0])