Skip to content

Commit

Permalink
Remove .exe suffix if any
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Liu <silver886@users.noreply.github.com>

Add comment

In shell completion, there is `.exe` suffix on Windows and this does not provide same experience across platforms, #16499

Signed-off-by: Leo Liu <silver886@users.noreply.github.com>
  • Loading branch information
silver886 committed Jan 10, 2025
1 parent 6abf83f commit 6876e5d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/podman/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ Options:

var (
rootCmd = &cobra.Command{
Use: filepath.Base(os.Args[0]) + " [options]",
// In shell completion, there is `.exe` suffix on Windows.
// This does not provide the same experience across platforms
// and was mentioned in [#16499](https://github.com/containers/podman/issues/16499).
//
// It was waiting for a fix in cobra upstream, but since that has not happened yet,
// a fix was implemented in [#24966](https://github.com/containers/podman/pull/24966).
Use: strings.TrimSuffix(filepath.Base(os.Args[0]), ".exe") + " [options]",
Long: "Manage pods, containers and images",
SilenceUsage: true,
SilenceErrors: true,
Expand Down

0 comments on commit 6876e5d

Please sign in to comment.