Skip to content

Commit

Permalink
Merge pull request #21177 from rhatdan/latest
Browse files Browse the repository at this point in the history
Remove --latest from podman CMD --help output
  • Loading branch information
openshift-merge-bot[bot] authored Jan 8, 2024
2 parents 952088f + 8341ca0 commit 9214402
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 33 deletions.
2 changes: 1 addition & 1 deletion cmd/podman/containers/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
ValidArgsFunction: common.AutocompleteContainersRunning,
Example: `podman container checkpoint --keep ctrID
podman container checkpoint --all
podman container checkpoint --leave-running --latest`,
podman container checkpoint --leave-running ctrID`,
}
)

Expand Down
3 changes: 1 addition & 2 deletions cmd/podman/containers/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ var (
return validate.CheckAllLatestAndIDFile(cmd, args, false, "")
},
ValidArgsFunction: common.AutocompleteContainersExited,
Example: `podman container cleanup --latest
podman container cleanup ctrID1 ctrID2 ctrID3
Example: `podman container cleanup ctrID1 ctrID2 ctrID3
podman container cleanup --all`,
}
)
Expand Down
6 changes: 2 additions & 4 deletions cmd/podman/containers/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ var (
return validate.CheckAllLatestAndIDFile(cmd, args, false, "")
},
ValidArgsFunction: common.AutocompleteContainersCreated,
Example: `podman init --latest
podman init 3c45ef19d893
Example: `podman init 3c45ef19d893
podman init test1`,
}

Expand All @@ -36,8 +35,7 @@ var (
RunE: initCommand.RunE,
Args: initCommand.Args,
ValidArgsFunction: initCommand.ValidArgsFunction,
Example: `podman container init --latest
podman container init 3c45ef19d893
Example: `podman container init 3c45ef19d893
podman container init test1`,
}
)
Expand Down
5 changes: 2 additions & 3 deletions cmd/podman/containers/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ var (
},
ValidArgsFunction: common.AutocompleteContainerOneArg,
Example: `podman port --all
podman port ctrID 80/tcp
podman port --latest 80`,
podman port ctrID 80/tcp`,
}

containerPortCommand = &cobra.Command{
Expand All @@ -41,7 +40,7 @@ var (
},
ValidArgsFunction: portCommand.ValidArgsFunction,
Example: `podman container port --all
podman container port --latest 80`,
podman container port CTRID 80`,
}
)

Expand Down
2 changes: 0 additions & 2 deletions cmd/podman/containers/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ var (
},
ValidArgsFunction: common.AutocompleteContainers,
Example: `podman restart ctrID
podman restart --latest
podman restart ctrID1 ctrID2`,
}

Expand All @@ -42,7 +41,6 @@ var (
Args: restartCommand.Args,
ValidArgsFunction: restartCommand.ValidArgsFunction,
Example: `podman container restart ctrID
podman container restart --latest
podman container restart ctrID1 ctrID2`,
}
)
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/containers/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var (
ValidArgsFunction: common.AutocompleteContainersAndImages,
Example: `podman container restore ctrID
podman container restore imageID
podman container restore --latest
podman container restore --all`,
}
)
Expand Down
6 changes: 2 additions & 4 deletions cmd/podman/containers/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ var (
RunE: start,
Args: validateStart,
ValidArgsFunction: common.AutocompleteContainersStartable,
Example: `podman start --latest
podman start 860a4b231279 5421ab43b45
Example: `podman start 860a4b231279 5421ab43b45
podman start --interactive --attach imageID`,
}

Expand All @@ -36,8 +35,7 @@ var (
RunE: startCommand.RunE,
Args: startCommand.Args,
ValidArgsFunction: startCommand.ValidArgsFunction,
Example: `podman container start --latest
podman container start 860a4b231279 5421ab43b45
Example: `podman container start 860a4b231279 5421ab43b45
podman container start --interactive --attach imageID`,
}
)
Expand Down
2 changes: 0 additions & 2 deletions cmd/podman/containers/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ var (
},
ValidArgsFunction: common.AutocompleteContainersRunning,
Example: `podman stop ctrID
podman stop --latest
podman stop --time 2 mywebserver 6e534f14da9d`,
}

Expand All @@ -44,7 +43,6 @@ var (
},
ValidArgsFunction: stopCommand.ValidArgsFunction,
Example: `podman container stop ctrID
podman container stop --latest
podman container stop --time 2 mywebserver 6e534f14da9d`,
}
)
Expand Down
2 changes: 0 additions & 2 deletions cmd/podman/containers/top.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ var (
Args: cobra.ArbitraryArgs,
ValidArgsFunction: common.AutocompleteTopCmd,
Example: `podman top ctrID
podman top --latest
podman top ctrID pid seccomp args %C
podman top ctrID -eo user,pid,comm`,
}
Expand All @@ -44,7 +43,6 @@ podman top ctrID -eo user,pid,comm`,
RunE: topCommand.RunE,
ValidArgsFunction: topCommand.ValidArgsFunction,
Example: `podman container top ctrID
podman container top --latest
podman container top ctrID pid seccomp args %C
podman container top ctrID -eo user,pid,comm`,
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/podman/networks/reload.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ var (
return validate.CheckAllLatestAndIDFile(cmd, args, false, "")
},
ValidArgsFunction: common.AutocompleteContainers,
Example: `podman network reload --latest
podman network reload 3c13ef6dd843
Example: `podman network reload 3c13ef6dd843
podman network reload test1 test2`,
}
)
Expand Down
3 changes: 1 addition & 2 deletions cmd/podman/pods/kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ var (
},
ValidArgsFunction: common.AutocompletePodsRunning,
Example: `podman pod kill podID
podman pod kill --signal TERM mywebserver
podman pod kill --latest`,
podman pod kill --signal TERM mywebserver`,
}
)

Expand Down
1 change: 0 additions & 1 deletion cmd/podman/pods/pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ var (
},
ValidArgsFunction: common.AutocompletePodsRunning,
Example: `podman pod pause podID1 podID2
podman pod pause --latest
podman pod pause --all`,
}
)
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/pods/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ var (
},
ValidArgsFunction: common.AutocompletePods,
Example: `podman pod restart podID1 podID2
podman pod restart --latest
podman pod restart --all`,
}
)
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/pods/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ var (
},
ValidArgsFunction: common.AutocompletePods,
Example: `podman pod start podID
podman pod start --latest
podman pod start --all`,
}
)
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/pods/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ var (
ValidArgsFunction: common.AutocompletePodsRunning,
Example: `podman pod stats
podman pod stats a69b23034235 named-pod
podman pod stats --latest
podman pod stats --all`,
}
)
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/pods/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ var (
},
ValidArgsFunction: common.AutocompletePodsRunning,
Example: `podman pod stop mywebserverpod
podman pod stop --latest
podman pod stop --time 0 490eb 3557fb`,
}
)
Expand Down
1 change: 0 additions & 1 deletion cmd/podman/pods/top.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ var (
Args: cobra.ArbitraryArgs,
ValidArgsFunction: common.AutocompleteTopCmd,
Example: `podman pod top podID
podman pod top --latest
podman pod top podID pid seccomp args %C
podman pod top podID -eo user,pid,comm`,
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/podman/pods/unpause.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ var (
},
ValidArgsFunction: common.AutoCompletePodsPause,
Example: `podman pod unpause podID1 podID2
podman pod unpause --all
podman pod unpause --latest`,
podman pod unpause --all`,
}
)

Expand Down

0 comments on commit 9214402

Please sign in to comment.