Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Commit 301126a

Browse files
authored
Merge pull request #121 from doringeman/misc
Enable completion for `tag` and disable it for `package`
2 parents d4e4936 + 65bfbf2 commit 301126a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

commands/package.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"io"
99
"path/filepath"
1010

11+
"github.com/docker/model-cli/commands/completion"
1112
"github.com/docker/model-cli/desktop"
1213
"github.com/docker/model-distribution/builder"
1314
"github.com/docker/model-distribution/registry"
@@ -67,6 +68,7 @@ func newPackagedCmd() *cobra.Command {
6768
}
6869
return nil
6970
},
71+
ValidArgsFunction: completion.NoComplete,
7072
}
7173

7274
c.Flags().StringVar(&opts.ggufPath, "gguf", "", "absolute path to gguf file (required)")

commands/tag.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package commands
33
import (
44
"fmt"
55

6+
"github.com/docker/model-cli/commands/completion"
67
"github.com/docker/model-cli/desktop"
78
"github.com/google/go-containerregistry/pkg/name"
89
"github.com/spf13/cobra"
@@ -28,6 +29,7 @@ func newTagCmd() *cobra.Command {
2829
}
2930
return tagModel(cmd, desktopClient, args[0], args[1])
3031
},
32+
ValidArgsFunction: completion.ModelNames(getDesktopClient, 1),
3133
}
3234
return c
3335
}

0 commit comments

Comments
 (0)