| 1 | cmd Main("cp") [
|
| 2 | requires Sources
|
| 3 | requires Dest | TargetDirectory
|
| 4 | ] {
|
| 5 |
|
| 6 | arg Sources(0..-1) => List<Path> [
|
| 7 | requires FileExists | DirExists
|
| 8 | ]
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 | arg Dest(-1) => Path [
|
| 13 | effects FileExists
|
| 14 | excludes TargetDirectory
|
| 15 | ]
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 | opt NoTargetDirectory("T", "no-target-directory") => Bool [
|
| 21 | excludes TargetDirectory
|
| 22 | ]
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 | opt TargetDirectory("t", "target-directory") => Path [
|
| 27 | requires DirExists
|
| 28 | excludes NoTargetDirectory
|
| 29 | ]
|
| 30 |
|
| 31 |
|
| 32 | opt Recursive("r", "R", "recursive") => Bool
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 | opt Archive("a", "archive") => Bool
|
| 37 |
|
| 38 |
|
| 39 | opt Link("l", "link") => Bool [
|
| 40 | excludes SymbolicLink
|
| 41 | ]
|
| 42 |
|
| 43 |
|
| 44 | opt SymbolicLink("s", "symbolic-link") => Bool [
|
| 45 | excludes Link
|
| 46 | ]
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 | opt Update("update") => "all" | "none" | "none-fail" | "older" [
|
| 51 | @default("older")
|
| 52 | ]
|
| 53 |
|
| 54 |
|
| 55 | opt UpdateOlder("u") => Bool
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 | opt NoClobber("n", "no-clobber") => Bool
|
| 60 |
|
| 61 |
|
| 62 | opt AttributesOnly("attributes-only") => Bool
|
| 63 |
|
| 64 |
|
| 65 | opt CopyContents("copy-contents") => Bool [
|
| 66 | requires Recursive
|
| 67 | ]
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 | opt Parents("parents") => Bool [
|
| 72 | requires TargetDirectory | Dest
|
| 73 | ]
|
| 74 |
|
| 75 |
|
| 76 | opt StripTrailingSlashes("strip-trailing-slashes") => Bool
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 | opt FollowCliLinks("H") => Bool [
|
| 82 | excludes Dereference
|
| 83 | excludes NoDereference
|
| 84 | ]
|
| 85 |
|
| 86 |
|
| 87 | opt Dereference("L", "dereference") => Bool [
|
| 88 | excludes NoDereference
|
| 89 | excludes FollowCliLinks
|
| 90 | ]
|
| 91 |
|
| 92 |
|
| 93 | opt NoDereference("P", "no-dereference") => Bool [
|
| 94 | excludes Dereference
|
| 95 | excludes FollowCliLinks
|
| 96 | ]
|
| 97 |
|
| 98 |
|
| 99 | opt KeepDirectorySymlink("keep-directory-symlink") => Bool
|
| 100 |
|
| 101 |
|
| 102 | type FileAttributes => "mode" | "ownership" | "timestamps" | "links" | "context" | "xattr" | "all"
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 | opt Preserve("preserve") => List<FileAttributes> [
|
| 107 | @default(["mode", "ownership", "timestamps"])
|
| 108 | ]
|
| 109 |
|
| 110 |
|
| 111 | opt PreserveBasic("p") => Bool
|
| 112 |
|
| 113 |
|
| 114 | opt NoPreserve("no-preserve") => List<FileAttributes>
|
| 115 |
|
| 116 | type BackupKind => "none" | "off" | "numbered" | "t" | "existing" | "nil" | "simple" | "never"
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 | opt Backup("backup") => BackupKind [
|
| 121 | @default("existing")
|
| 122 | ]
|
| 123 |
|
| 124 |
|
| 125 | opt BackupSimple("b") => Bool
|
| 126 |
|
| 127 |
|
| 128 | opt Suffix("S", "suffix") => String
|
| 129 |
|
| 130 | type BehaviourKind => "auto" | "always" | "never"
|
| 131 |
|
| 132 |
|
| 133 | opt Reflink("reflink") => BehaviourKind [
|
| 134 | @default("auto")
|
| 135 | ]
|
| 136 |
|
| 137 |
|
| 138 | opt Sparse("sparse") => BehaviourKind [
|
| 139 | @default("auto")
|
| 140 | ]
|
| 141 |
|
| 142 |
|
| 143 | opt OneFileSystem("x", "one-file-system") => Bool
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 | opt RemoveDestination("remove-destination") => Bool [
|
| 148 | excludes Force
|
| 149 | ]
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 | opt Force("f", "force") => Bool [
|
| 155 | excludes RemoveDestination
|
| 156 | ]
|
| 157 |
|
| 158 |
|
| 159 | opt Interactive("i", "interactive") => Bool [
|
| 160 | excludes NoClobber
|
| 161 | ]
|
| 162 |
|
| 163 |
|
| 164 | opt SelinuxDefault("Z") => Bool [
|
| 165 | excludes Context
|
| 166 | ]
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 | opt Context("context") => String [
|
| 171 | excludes SelinuxDefault
|
| 172 | ]
|
| 173 |
|
| 174 |
|
| 175 | opt Verbose("v", "verbose") => Bool
|
| 176 |
|
| 177 |
|
| 178 | opt Debug("debug") => Bool
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 | opt Help("help") => Bool [
|
| 183 | excludes All
|
| 184 | ]
|
| 185 |
|
| 186 |
|
| 187 | opt Version("version") => Bool [
|
| 188 | excludes All
|
| 189 | ]
|
| 190 | }
|