Revision 66ccfd46
Added by Marc Dequènes about 15 years ago
- ID 66ccfd460138c5c0f6e0077db962a4823a107425
bin/shadowwalker | ||
---|---|---|
"<object> <item> <field>#?",
|
||
"<object> <item> <field>[#<index>]"
|
||
]
|
||
self.options = CmdParse::OptionParserWrapper.new do |opt|
|
||
opt.on( '-f', '--family', 'Display family members.' ) { $program_options[:show_family_members] = true }
|
||
end
|
||
end
|
||
|
||
def execute (args)
|
lib/ldap_shadows/display_utils.rb | ||
---|---|---|
puts "#{rel}: " + rel_value
|
||
end
|
||
|
||
puts "--- Family ---"
|
||
puts "parent: " + item.family_parent_dn.to_s
|
||
puts "siblings: " + item.family_siblings_dn.join(", ")
|
||
puts "children: " + item.family_children_dn.join(", ")
|
||
if options[:show_family_members]
|
||
puts "--- Family ---"
|
||
puts "parent: " + item.family_parent_dn.to_s
|
||
puts "siblings: " + item.family_siblings_dn.join(", ")
|
||
puts "children: " + item.family_children_dn.join(", ")
|
||
end
|
||
else
|
||
obj_info, obj_aspects = item.organized_data
|
||
|
||
... | ... | |
display_fields(aspect_data, options)
|
||
end
|
||
|
||
puts "--- Family ---"
|
||
puts "parent: " + LdapObject.raw_item_info(item.family_parent)[:name]
|
||
puts "siblings: " + item.family_siblings.collect{|raw_item| LdapObject.raw_item_info(raw_item)[:name] }.join(", ")
|
||
puts "children: " + item.family_children.collect{|raw_item| LdapObject.raw_item_info(raw_item)[:name] }.join(", ")
|
||
if options[:show_family_members]
|
||
puts "--- Family ---"
|
||
puts "parent: " + LdapObject.raw_item_info(item.family_parent)[:name]
|
||
puts "siblings: " + item.family_siblings.collect{|raw_item| LdapObject.raw_item_info(raw_item)[:name] }.join(", ")
|
||
puts "children: " + item.family_children.collect{|raw_item| LdapObject.raw_item_info(raw_item)[:name] }.join(", ")
|
||
end
|
||
end
|
||
end
|
||
|
Also available in: Unified diff
[evol] display family members optionally in show command (can be lengthy)