Project

General

Profile

« Previous | Next » 

Revision 35b342c1

Added by Marc Dequènes about 15 years ago

  • ID 35b342c16e599b0eb59e3fcc2944a923334676b3

[evol] search can use family relationship as criterias

View differences:

bin/shadowwalker
class Command < CmdParse::Command
attr_accessor :usages_params
attr_accessor :usages_params, :usage_extra_info
def usage
if @usages_params
usage_str = if @usages_params
base_usage_str = super.sub("[ARGS]", "")
usages = @usages_params.collect {|params| base_usage_str + params }
usages.join("\n")
else
super
end
usage_str+= "\n" + @usage_extra_info if @usage_extra_info
usage_str
end
def execute(args)
......
self.short_desc = "Search items"
self.usages_params = [
"[:objects=<object>[,<object>]...] [:aspects=<aspect>[,<aspect>]...] [<field>=<value>] ..."
"[:objects=<object>[,<object>]...] [:aspects=<aspect>[,<aspect>]...] [<field>=<value>] [:parents|:siblings|:children|:ancestors|:successors=<item-full-handle>[,<item-full-handle>]] ..."
]
self.usage_extra_info = "Criterias are AND-ed, but lists of values for a criteria are OR-ed."
end
def execute(args)

Also available in: Unified diff