id = "basename" name = "basename" description = "Return the filename portion of a pathname." executables = ["basename"] [commands] format = 1 label = "Strip directory from path" description = "Print the last component of one or more paths, optionally removing a suffix." quality = "ai-draft" base = "fig:basename" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/basename.ts" license = "MIT" [[commands.field]] id = "names" label = "Paths" type = "string" position = 0 multiple = true sources = ["fig"] [[commands.field]] id = "all" label = "Treat every argument as a string" type = "boolean" option = ["-a"] sources = ["fig"] [[commands.field]] id = "suffix" label = "Suffix to remove" type = "string" option = ["-s"] sources = ["fig"] [[commands.task]] id = "strip" label = "Strip directories" fields = ["names", "all"] required = ["names"] set = { all = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["names", "all", "suffix"]