Project

General

Profile

« Previous | Next » 

Revision bd714351

Added by Marc Dequènes about 15 years ago

  • ID bd7143516b6b7a3beb93713f6dfc7752723d0208

[evol] added search command (working, but items are not recognized yet)

View differences:

bin/shadowwalker
end
cmdparser.add_command(CreateCommand.new)
class SearchCommand < Command
def initialize
super('search', false)
self.short_desc = "Search items"
self.usages_params = [
"[:objects=<object>[,<object>]...] [:aspects=<aspect>[,<aspect>]...] [<field>=<value>] ..."
]
end
def execute (args)
raise SyntaxError, _("no search arguments") if args.empty?
res = LdapObject.items_search_from_strings(args)
res2 = Hash[res]
puts res2.keys.sort.join("\n")
end
end
cmdparser.add_command(SearchCommand.new)
begin
cmdparser.parse

Also available in: Unified diff