id = "shred" name = "shred" description = "Overwrite a file to hide its contents, and optionally delete it." executables = ["shred"] [commands] format = 1 label = "Shred files" description = "Overwrite files so their contents are hard to recover. This destroys data irreversibly; the file is only removed when a --remove method is chosen." quality = "ai-draft" base = "fig:shred" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/shred.ts" license = "MIT" [[commands.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input", must_exist = true } effect = "overwrite" sources = ["fig"] [[commands.field]] id = "iterations" label = "Overwrite passes" description = "Default is 3." type = "string" option = ["-n", "--iterations"] suggestions = [{ value = "3", label = "3" }, { value = "5", label = "5" }, { value = "7", label = "7" }] sources = ["fig"] [[commands.field]] id = "remove" label = "Remove after shredding" type = "string" option = ["--remove"] effect = "delete" suggestions = [{ value = "unlink", label = "unlink" }, { value = "wipe", label = "wipe" }, { value = "wipesync", label = "wipesync" }] sources = ["fig"] [[commands.field]] id = "zero" label = "Final zero pass" type = "boolean" option = ["-z", "--zero"] sources = ["fig"] [[commands.field]] id = "force" label = "Force" description = "Change permissions to allow writing if necessary." type = "boolean" option = ["-f", "--force"] sources = ["fig"] [[commands.field]] id = "verbose" label = "Show progress" type = "boolean" option = ["-v", "--verbose"] sources = ["fig"] [[commands.field]] id = "size" label = "Bytes to shred" type = "string" option = ["-s", "--size"] suggestions = [{ value = "1K", label = "1K" }, { value = "1M", label = "1M" }] sources = ["fig"] [[commands.field]] id = "exact" label = "Exact size" type = "boolean" option = ["-x", "--exact"] sources = ["fig"] [[commands.task]] id = "shred-remove" label = "Shred and delete" set = { remove = ["wipe"], zero = [true] } fields = ["files", "remove", "iterations", "zero", "verbose"] required = ["files"] [[commands.group]] id = "basic" label = "Basic" fields = ["files", "iterations", "remove", "zero", "verbose"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["size", "exact", "force"]