Revision a4aeb5ee
Added by Marc Dequènes about 15 years ago
- ID a4aeb5ee7441c8f850025b32570dc258ee298ee8
bin/shadowwalker | ||
---|---|---|
raise SyntaxError, _("no search arguments") if args.empty?
|
||
|
||
res = LdapObject.items_search_from_strings(args)
|
||
res2 = Hash[res]
|
||
puts res2.keys.sort.join("\n")
|
||
unless res.empty?
|
||
display_lines = []
|
||
Hash[res].each_pair do |item_dn, item_data|
|
||
obj_hdl = LdapObject.find_raw_item_object(item_data)
|
||
if obj_hdl
|
||
obj_klass = $ldapctl.find_klass(obj_hdl)
|
||
item = obj_klass.new(item_dn)
|
||
display_lines << "#{obj_hdl}/#{item.name}"
|
||
else
|
||
display_lines << "unknown/#{item_dn}"
|
||
end
|
||
end
|
||
puts display_lines.join("\n")
|
||
end
|
||
end
|
||
end
|
||
cmdparser.add_command(SearchCommand.new)
|
Also available in: Unified diff
[evol] recognize objects out of search result, and display them properly