1

By running:

  $ declare -F | wc -l
  488

I found a lot more functions than I was expecting.

Examples:

declare -f __docker_append_to_completions
declare -f __docker_complete_capabilities_addable
declare -f __docker_complete_capabilities_droppable
declare -f __docker_complete_configs
declare -f __docker_complete_container_ids
declare -f __docker_complete_container_names
declare -f __docker_complete_containers
declare -f __docker_complete_containers_all
declare -f __docker_complete_containers_in_network
declare -f __docker_complete_containers_removable
declare -f __docker_complete_containers_running
declare -f __docker_complete_containers_stopped
declare -f __docker_complete_containers_unpauseable
declare -f __docker_complete_detach_keys
declare -f __docker_complete_image_repos
declare -f __docker_complete_image_repos_and_tags
declare -f __docker_complete_images
declare -f __docker_complete_isolation
declare -f __docker_complete_local_interfaces
declare -f __docker_complete_local_ips
declare -f __docker_complete_log_driver_options
declare -f __docker_complete_log_drivers
declare -f __docker_complete_log_levels
declare -f __docker_complete_log_options
declare -f __docker_complete_networks
declare -f __docker_complete_nodes
declare -f __docker_complete_plugins_bundled
declare -f __docker_complete_plugins_installed
declare -f __docker_complete_resolved_hostname
declare -f __docker_complete_restart
declare -f __docker_complete_runtimes
declare -f __docker_complete_secrets
declare -f __docker_complete_services
declare -f __docker_complete_services_and_tasks
declare -f __docker_complete_signals
declare -f __docker_complete_stacks
declare -f __docker_complete_user_group
declare -f __docker_complete_volumes
declare -f __docker_configs
declare -f __docker_containers
declare -f __docker_daemon_is_experimental
declare -f __docker_daemon_os_is
declare -f __docker_images
declare -f __docker_local_interfaces
declare -f __docker_map_key_of_current_option
declare -f __docker_networks
declare -f __docker_nodes
declare -f __docker_nospace
declare -f __docker_plugins_bundled
declare -f __docker_plugins_installed
declare -f __docker_pos_first_nonflag
declare -f __docker_q
declare -f __docker_runtimes
declare -f __docker_secrets
declare -f __docker_services
declare -f __docker_stacks
declare -f __docker_subcommands
declare -f __docker_tasks
declare -f __docker_to_alternatives
declare -f __docker_to_extglob
declare -f __docker_value_of_option
declare -f __docker_volumes
declare -f __git_eread
declare -f __git_ps1
declare -f __git_ps1_colorize_gitstring
declare -f __git_ps1_show_upstream
declare -f __grub_dir
declare -f __grub_get_last_option
declare -f __grub_get_options_from_help
declare -f __grub_get_options_from_usage
declare -f __grub_list_menuentries
declare -f __grub_list_modules
declare -f __grubcomp
declare -f __mvnarchetype_generate
declare -f __mvncomp
declare -f __mvncomp_1
declare -f __mvndependency_analyze
declare -f __mvndependency_analyze_dep_mgt
declare -f __mvndependency_purge_local_repository
declare -f __mvndependency_resolve
declare -f __mvndependency_tree
declare -f __mvndependency_x_dependencies
declare -f __mvndeploy_deploy
declare -f __mvndeploy_deploy_file
declare -f __mvnhelp_describe
declare -f __mvninstall_install_file
declare -f __mvnlist_goals
declare -f __mvnlist_jars
declare -f __mvnlist_poms
declare -f __mvnlist_prefix
declare -f __mvnlist_projects
declare -f __mvnplugin_help
declare -f __mvnprefix_colon
declare -f __mvnprefix_comma
declare -f __mvnprefix_equals
declare -f __mvnrelease_prepare
declare -f __mvnscm_checkin
declare -f __nvm
declare -f __nvm_alias
declare -f __nvm_aliases
declare -f __nvm_commands
declare -f __nvm_generate_completion
declare -f __nvm_installed_nodes
declare -f __nvm_options
declare -f __tig_complete_file
declare -f __tig_complete_revlist
declare -f __tig_refs
declare -f __tigdir
declare -f _docker
declare -f _docker_attach
declare -f _docker_build
declare -f _docker_checkpoint
declare -f _docker_checkpoint_create
declare -f _docker_checkpoint_ls
declare -f _docker_checkpoint_rm
declare -f _docker_commit
declare -f _docker_config
declare -f _docker_config_create
declare -f _docker_config_inspect
declare -f _docker_config_list
declare -f _docker_config_ls
declare -f _docker_config_remove
declare -f _docker_config_rm
declare -f _docker_container
declare -f _docker_container_attach
declare -f _docker_container_commit
declare -f _docker_container_cp
declare -f _docker_container_create
declare -f _docker_container_diff
declare -f _docker_container_exec
declare -f _docker_container_export
declare -f _docker_container_inspect
declare -f _docker_container_kill
declare -f _docker_container_list
declare -f _docker_container_logs
declare -f _docker_container_ls
declare -f _docker_container_pause
declare -f _docker_container_port
declare -f _docker_container_prune
declare -f _docker_container_ps
declare -f _docker_container_rename
declare -f _docker_container_restart
declare -f _docker_container_rm
declare -f _docker_container_run
declare -f _docker_container_run_and_create
declare -f _docker_container_start
declare -f _docker_container_stats
declare -f _docker_container_stop
declare -f _docker_container_top
declare -f _docker_container_unpause
declare -f _docker_container_update
declare -f _docker_container_wait
declare -f _docker_cp
declare -f _docker_create
declare -f _docker_daemon
declare -f _docker_deploy
declare -f _docker_diff
declare -f _docker_docker
declare -f _docker_events
declare -f _docker_exec
declare -f _docker_export
declare -f _docker_help
declare -f _docker_history
declare -f _docker_image
declare -f _docker_image_build
declare -f _docker_image_history
declare -f _docker_image_images
declare -f _docker_image_import
declare -f _docker_image_inspect
declare -f _docker_image_list
declare -f _docker_image_load
declare -f _docker_image_ls
declare -f _docker_image_prune
declare -f _docker_image_pull
declare -f _docker_image_push
declare -f _docker_image_remove
declare -f _docker_image_rm
declare -f _docker_image_rmi
declare -f _docker_image_save
declare -f _docker_image_tag
declare -f _docker_images
declare -f _docker_import
declare -f _docker_info
declare -f _docker_inspect
declare -f _docker_kill
declare -f _docker_load
declare -f _docker_login
declare -f _docker_logout
declare -f _docker_logs
declare -f _docker_network
declare -f _docker_network_connect
declare -f _docker_network_create
declare -f _docker_network_disconnect
declare -f _docker_network_inspect
declare -f _docker_network_ls
declare -f _docker_network_prune
declare -f _docker_network_rm
declare -f _docker_node
declare -f _docker_node_demote
declare -f _docker_node_inspect
declare -f _docker_node_list
declare -f _docker_node_ls
declare -f _docker_node_promote
declare -f _docker_node_ps
declare -f _docker_node_remove
declare -f _docker_node_rm
declare -f _docker_node_update
declare -f _docker_pause
declare -f _docker_plugin
declare -f _docker_plugin_create
declare -f _docker_plugin_disable
declare -f _docker_plugin_enable
declare -f _docker_plugin_inspect
declare -f _docker_plugin_install
declare -f _docker_plugin_list
declare -f _docker_plugin_ls
declare -f _docker_plugin_push
declare -f _docker_plugin_remove
declare -f _docker_plugin_rm
declare -f _docker_plugin_set
declare -f _docker_plugin_upgrade
declare -f _docker_port
declare -f _docker_ps
declare -f _docker_pull
declare -f _docker_push
declare -f _docker_rename
declare -f _docker_restart
declare -f _docker_rm
declare -f _docker_rmi
declare -f _docker_run
declare -f _docker_save
declare -f _docker_search
declare -f _docker_secret
declare -f _docker_secret_create
declare -f _docker_secret_inspect
declare -f _docker_secret_list
declare -f _docker_secret_ls
declare -f _docker_secret_remove
declare -f _docker_secret_rm
declare -f _docker_service
declare -f _docker_service_create
declare -f _docker_service_inspect
declare -f _docker_service_list
declare -f _docker_service_logs
declare -f _docker_service_ls
declare -f _docker_service_ps
declare -f _docker_service_remove
declare -f _docker_service_rm
declare -f _docker_service_rollback
declare -f _docker_service_scale
declare -f _docker_service_update
declare -f _docker_service_update_and_create
declare -f _docker_stack
declare -f _docker_stack_deploy
declare -f _docker_stack_down
declare -f _docker_stack_list
declare -f _docker_stack_ls
declare -f _docker_stack_ps
declare -f _docker_stack_remove
declare -f _docker_stack_rm
declare -f _docker_stack_services
declare -f _docker_stack_up
declare -f _docker_start
declare -f _docker_stats
declare -f _docker_stop
declare -f _docker_swarm
declare -f _docker_swarm_ca
declare -f _docker_swarm_init
declare -f _docker_swarm_join
declare -f _docker_swarm_join_token
declare -f _docker_swarm_leave
declare -f _docker_swarm_unlock
declare -f _docker_swarm_unlock_key
declare -f _docker_swarm_update
declare -f _docker_system
declare -f _docker_system_df
declare -f _docker_system_events
declare -f _docker_system_info
declare -f _docker_system_prune
declare -f _docker_tag
declare -f _docker_top
declare -f _docker_trust
declare -f _docker_trust_revoke
declare -f _docker_trust_sign
declare -f _docker_trust_view
declare -f _docker_unpause
declare -f _docker_update
declare -f _docker_version
declare -f _docker_volume
declare -f _docker_volume_create
declare -f _docker_volume_inspect
declare -f _docker_volume_list
declare -f _docker_volume_ls
declare -f _docker_volume_prune
declare -f _docker_volume_remove
declare -f _docker_volume_rm
declare -f _docker_wait
declare -f _grub_editenv
declare -f _grub_install
declare -f _grub_mkconfig
declare -f _grub_mkfont
declare -f _grub_mkimage
declare -f _grub_mkpasswd_pbkdf2
declare -f _grub_mkrescue
declare -f _grub_probe
declare -f _grub_script_check
declare -f _grub_set_entry
declare -f _grub_setup
declare -f nvm
declare -f nvm_add_iojs_prefix
declare -f nvm_alias
declare -f nvm_alias_path
declare -f nvm_auto
declare -f nvm_binary_available
declare -f nvm_cache_dir
declare -f nvm_cd
declare -f nvm_change_path
declare -f nvm_check_file_permissions
declare -f nvm_checksum
declare -f nvm_clang_version
declare -f nvm_command_info
declare -f nvm_compare_checksum
declare -f nvm_compute_checksum
declare -f nvm_curl_libz_support
declare -f nvm_curl_use_compression
declare -f nvm_curl_version
declare -f nvm_die_on_prefix
declare -f nvm_download
declare -f nvm_download_artifact
declare -f nvm_echo
declare -f nvm_ensure_default_set
declare -f nvm_ensure_version_installed
declare -f nvm_ensure_version_prefix
declare -f nvm_err
declare -f nvm_find_nvmrc
declare -f nvm_find_up
declare -f nvm_format_version
declare -f nvm_get_arch
declare -f nvm_get_checksum
declare -f nvm_get_checksum_alg
declare -f nvm_get_download_slug
declare -f nvm_get_latest
declare -f nvm_get_make_jobs
declare -f nvm_get_minor_version
declare -f nvm_get_mirror
declare -f nvm_get_os
declare -f nvm_grep
declare -f nvm_has
declare -f nvm_has_colors
declare -f nvm_has_non_aliased
declare -f nvm_has_solaris_binary
declare -f nvm_has_system_iojs
declare -f nvm_has_system_node
declare -f nvm_install_binary
declare -f nvm_install_default_packages
declare -f nvm_install_latest_npm
declare -f nvm_install_npm_if_needed
declare -f nvm_install_source
declare -f nvm_iojs_prefix
declare -f nvm_is_alias
declare -f nvm_is_iojs_version
declare -f nvm_is_merged_node_version
declare -f nvm_is_natural_num
declare -f nvm_is_valid_version
declare -f nvm_is_version_installed
declare -f nvm_list_aliases
declare -f nvm_ls
declare -f nvm_ls_current
declare -f nvm_ls_remote
declare -f nvm_ls_remote_index_tab
declare -f nvm_ls_remote_iojs
declare -f nvm_make_alias
declare -f nvm_match_version
declare -f nvm_node_prefix
declare -f nvm_normalize_version
declare -f nvm_npm_global_modules
declare -f nvm_num_version_groups
declare -f nvm_print_alias_path
declare -f nvm_print_default_alias
declare -f nvm_print_formatted_alias
declare -f nvm_print_implicit_alias
declare -f nvm_print_npm_version
declare -f nvm_print_versions
declare -f nvm_process_parameters
declare -f nvm_rc_version
declare -f nvm_remote_version
declare -f nvm_remote_versions
declare -f nvm_resolve_alias
declare -f nvm_resolve_local_alias
declare -f nvm_sanitize_path
declare -f nvm_strip_iojs_prefix
declare -f nvm_strip_path
declare -f nvm_supports_source_options
declare -f nvm_supports_xz
declare -f nvm_tree_contains_path
declare -f nvm_use_if_needed
declare -f nvm_validate_implicit_alias
declare -f nvm_version
declare -f nvm_version_dir
declare -f nvm_version_greater
declare -f nvm_version_greater_than_or_equal_to
declare -f nvm_version_path

The obvious reason is that I installed software packages (examples: grub,git, maven, node, nvm, docker). The more interesting (for me) is why all these applications make their functions available to the whole bash?

EDIT to add examples.

closed as too broad by Sparhawk, jasonwryan, Fabby, n.st, Isaac Dec 9 '18 at 3:55

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    We can't really answer this without knowing what is in declare -F, and/or what specific packages you have installed. – Sparhawk Dec 8 '18 at 23:37
  • 3
    Probably many of these functions are actually for handling completion and are defined in /usr/share/bash-completion/bash_completion or one of the scripts in /etc/bash_completion.d/. – Arkadiusz Drabczyk Dec 8 '18 at 23:46
  • If you don't know why you defined them, how would we? – Bagalaw Dec 9 '18 at 0:25
  • @Sparhawk declare is a built in Bash command that lists shell variables (and functions) gnu.org/software/bash/manual/bash.html#index-declare – Fernando César Dec 9 '18 at 0:46
  • 1
    @FernandoCésar I believe that what Sparhawk meant is: What is the text that you got from the command declare -F. I also believe he knows what declare is and does. – Isaac Dec 9 '18 at 0:52

Browse other questions tagged or ask your own question.