cfdisk: updated to util-linux 2.41

This commit is contained in:
Saurabh Kushwah 2025-04-28 21:41:58 +05:30
parent 529beb6193
commit a8245a8b7a
No known key found for this signature in database
GPG Key ID: 8E11E1DCD6CCE8D5

View File

@ -10,19 +10,22 @@ import (
var rootCmd = &cobra.Command{
Use: "cfdisk",
Short: "display or manipulate a disk partition table",
Long: "https://en.wikipedia.org/wiki/Cfdisk",
Long: "https://man7.org/linux/man-pages/man8/cfdisk.8.html",
Run: func(cmd *cobra.Command, args []string) {},
}
func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()
rootCmd.Flags().StringP("color", "L", "", "colorize output")
rootCmd.Flags().BoolP("help", "h", false, "display this help")
rootCmd.Flags().String("lock", "", "use exclusive device lock")
rootCmd.Flags().BoolP("read-only", "r", false, "forced open cfdisk in read-only mode")
rootCmd.Flags().StringP("sector-size", "b", "", "physical and logical sector size")
rootCmd.Flags().BoolP("version", "V", false, "display version")
rootCmd.Flags().BoolP("zero", "z", false, "start with zeroed partition table")
@ -30,8 +33,9 @@ func init() {
rootCmd.Flag("lock").NoOptDefVal = " "
carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
"color": carapace.ActionValues("auto", "never", "always").StyleF(style.ForKeyword),
"lock": carapace.ActionValues("yes", "no", "nonblock").StyleF(style.ForKeyword),
"color": carapace.ActionValues("auto", "never", "always").StyleF(style.ForKeyword),
"lock": carapace.ActionValues("yes", "no", "nonblock").StyleF(style.ForKeyword),
"sector-size": carapace.ActionValues("512", "1024", "2048", "4096"),
})
carapace.Gen(rootCmd).PositionalCompletion(