chmod: updated to GNU coreutils 9.7

This commit is contained in:
Saurabh Kushwah 2025-04-30 22:38:31 +05:30
parent fd2c225a48
commit ab06e6ba9e
No known key found for this signature in database
GPG Key ID: 8E11E1DCD6CCE8D5

View File

@ -9,18 +9,24 @@ import (
var rootCmd = &cobra.Command{
Use: "chmod",
Short: "change file mode bits",
Long: "https://en.wikipedia.org/wiki/Chmod",
Long: "https://www.man7.org/linux/man-pages/man1/chmod.1.html",
Run: func(cmd *cobra.Command, args []string) {},
}
func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()
rootCmd.Flags().BoolS("H", "H", false, "if a command line argument is a symbolic link to a directory, traverse it")
rootCmd.Flags().BoolS("L", "L", false, "traverse every symbolic link to a directory encountered")
rootCmd.Flags().BoolS("P", "P", false, "do not traverse any symbolic links")
rootCmd.Flags().BoolP("changes", "c", false, "like verbose but report only when a change is made")
rootCmd.Flags().Bool("dereference", false, "affect the referent of each symbolic link, rather than the symbolic link itself")
rootCmd.Flags().Bool("help", false, "display this help and exit")
rootCmd.Flags().BoolP("no-dereference", "h", false, "affect each symbolic link, rather than the referent")
rootCmd.Flags().Bool("no-preserve-root", false, "do not treat '/' specially (the default)")
rootCmd.Flags().Bool("preserve-root", false, "fail to operate recursively on '/'")
rootCmd.Flags().Bool("quiet", false, "suppress most error messages")