Jump to content

sup help


amn

Recommended Posts

right now if you type sup -h you get 

Usage: sup [-?] [-n [<node>]] [-c [<cookie>]] [-t [<timeout>]] [-v]
           [<module>] [<function>] [args ...]

  -?, --help     Show the program options
  -n, --node     Node name [default: kazoo_apps]
  -c, --cookie   Erlang cookie [default: change_me]
  -t, --timeout  Command timeout [default: 0]
  -v, --verbose  Be verbose
  <module>       The name of the remote module
  <function>     The name of the remote module's function

It would sure be nice if it output all the sup commands.  

I generate them using the included script

mkdir /usr/doc

/opt/kazoo/lib/sup*/priv/build-autocomplete.escript \
/etc/bash_completion.d/sup.bash /opt/kazoo > /usr/doc/sup_commands

There are about 800 of them.  To shorten that up could maybe take an argument so if someone were to type in

sup -h ecall

it could show all the commands that start with sup ecallmgr etc.  Maybe even autocomplete.

Link to comment
Share on other sites

  • 2600Hz Employees

I'm confused; bash auto-completion helps with exactly that. Consider:

 

james@pdx:~/local/git/2600hz/kazoo/core/sup$ sup
acdc_agent_maintenance            doodle_maintenance                kapps_config                      kazoo_modb_maintenance            kazoo_voicemail_maintenance       tasks_maintenance
acdc_maintenance                  ecallmgr_config                   kapps_controller                  kazoo_modb_migrate_maintenance    konami_maintenance                teletype_maintenance
blackhole_maintenance             ecallmgr_maintenance              kapps_maintenance                 kazoo_number_manager_maintenance  media_mgr_maintenance             trunkstore_maintenance
callflow_maintenance              fax_maintenance                   kazoo_amqp_maintenance            kazoo_oauth_maintenance           notify_maintenance                webhooks_maintenance
call_inspector_maintenance        frontier_maintenance              kazoo_auth_maintenance            kazoo_perf_maintenance            notify_resend_maintenance         
cb_apps_maintenance               hangups_maintenance               kazoo_data_maintenance            kazoo_proper_maintenance          omnipresence_maintenance          
conference_maintenance            hotornot_maintenance              kazoo_ips_maintenance             kazoo_services_maintenance        pusher_maintenance                
crossbar_bindings                 jonny5_maintenance                kazoo_maintenance                 kazoo_speech_maintenance          registrar_maintenance             
crossbar_maintenance              kapps_account_config              kazoo_media_maintenance           kazoo_transactions_maintenance    stepswitch_maintenance            
james@pdx:~/local/git/2600hz/kazoo/core/sup$ sup ecallmgr_
ecallmgr_config       ecallmgr_maintenance  
james@pdx:~/local/git/2600hz/kazoo/core/sup$ sup ecallmgr_maintenance 
acl_summary                   channel_summary               disable_authz                 flush_node_channels           limit_channel_uptime          registrar_sync                show_channels
add_fs_node                   check_sync                    disable_local_resource_authz  flush_node_conferences        list_fs_nodes                 reload_acls                   sync_channels
allow_carrier                 conference_details            enable_authz                  flush_registrar               node_details                  remove_acl                    sync_conferences
allow_sbc                     conference_summary            enable_local_resource_authz   flush_util                    node_summary                  remove_fs_node                test_carrier_ip
carrier_acls                  deny_carrier                  flush_acls                    get_fs_nodes                  registrar_details             sbc_acls                      test_sbc_ip
channel_details               deny_sbc                      flush_authn                   hangup_long_running_channels  registrar_summary             show_calls                    
james@pdx:~/local/git/2600hz/kazoo/core/sup$ sup ecallmgr_maintenance  flush_
flush_acls              flush_authn             flush_node_channels     flush_node_conferences  flush_registrar         flush_util

I think the -h flag is preventing bash auto-completion for you.

Link to comment
Share on other sites

×
×
  • Create New...