1cmd Main("rm") [
2 requires RemoveFiles
3] {
4 /// files to be removed
5 arg RemoveFiles(..) => List<Path> [
6 requires FileExists
7 effects FileNotExists
8 ]
9
10 /// ignore nonexistent files and arguments, never prompt
11 opt Force("f", "force") => Bool
12
13 /// prompt before every removal
14 opt PromptEveryTime("i") => Bool
15
16 /// prompt once before removing more than three files, or when
17 /// removing recursively; less intrusive than -i, while still
18 /// giving protection against most mistakes
19 opt PromptOnce("I") => Bool
20
21 /// prompt according to WHEN: never, once (-I), or always (-i);
22 /// without WHEN, prompt always
23 opt Interactive("interactive") => "never" | "no" | "none" | "once" | "always" | "yes" [
24 @default("never")
25 ]
26
27 /// when removing a hierarchy recursively, skip any directory
28 /// that is on a file system different from that of the
29 /// corresponding command line argument
30 opt OneFs("one-file-system") => Bool
31
32 /// do not remove '/' (default); with 'all', reject any command
33 /// line argument on a separate device from its parent
34 opt NoPreserveRoot("preserve-root") => String [
35 @default("all")
36 ]
37
38 /// remove directories and their contents recursively
39 opt Recursive("r", "R", "recursive") => Bool
40
41 /// remove empty directories
42 opt Dir("d", "dir") => Bool
43
44 /// explain what is being done
45 opt Verbose("v", "verbose") => Bool
46
47 /// show help menu
48 opt Help("help") => Bool [
49 excludes All
50 ]
51
52 /// output version information and exit
53 opt Version("version") => Bool [
54 excludes All
55 ]
56}