Bash-completion can prompt commands, prompt command parameters, in CentOS7, many of the daily management of the command format is longer such as NMCLI, IP, firewall-cmd, SYSTEMCTL, etc., with bash-completion can quickly, Learn the use of new commands in a friendly way.
When the system is minimized, it is not installed by default, since the software is installed in the Epel library, install Epel-release first. Note that after the installation is done in the new shell, you need to re-connect or create a new bash.
Yum Install Epel-release-yyum Install bash-completion-y
as follows, the software information has been installed:
[[email protected] ~]# rpm -qi bash-completion name : bash-completion Relocations: (not relocatable) version : 1.3 Vendor: Fedora ProjectRelease : 7.el6 build date: 2013 April 02 Tuesday 23:00 20 sec install date: 2017 June 21 Wednesday 09 46 minutes 44 seconds Build host: buildvm-02.phx2.fedoraproject.orggroup : system environment/shells Source RPM: bash-completion-1.3-7.el6.src.rpmSize : 590294 license: gplv2+signature : rsa/8, 2013 April 03 Wednesday 07 44 minutes, 10 seconds, key id 3b49df2a0608b895packager : fedora projecturl : http://bash-completion.alioth.debian.org/Summary : programmable completion for bashdescription :bash-completion is a collection of shell functions that take advantage of the Programmable completion feature of bash.
Use the TAB key to complete the command, complete parameters as shown below, CentOS7 system commands are more readable, parameters and options to use more friendly:
#bash-completion function demonstration, TAB key to complement common command parameter options [[email protected] ~]# systemsystemctl systemd-inhibitsystemd-analyze systemd-loginctlsystemd-ask-password systemd-machine-id-setupsystemd-cat systemd-notifysystemd-cgls systemd-nspawnsystemd-cgtop systemd-pathsystemd-coredumpctl systemd-runsystemd-delta systemd-stdio-bridgesystemd-detect-virt systemd-sysv-convertsystemd-escape systemd-tmpfilessystemd-firstboot systemd-tty-ask-password-agentsystemd-hwdb [[email protected] ~]# Systemctl add-requires hybrid-sleep reload-or-restartadd-wants is-active reload-or-try-restartcancel is-enabled rescuecat is-failed reset-failedcondreload isolate restartcondrestart Is-system-running set-defaultcondstop kexec set-environmentdaemon-reexec kill set-propertydaemon-reload link showdefault list-dependencies show-environmentdelete list-jobs snapshotdisable list-sockets startedit list-timers statusemergency list-unit-files stopenable list-units suspendexit mask switch-rootforce-reload poweroff try-restartget-default preset unmaskhalt reboot unset-environmenthelp reenable hibernate reload [[email protected] ~]# nmcli agent device help networking connection general monitor radio [[email protected] ~]# nmcli connection add delete edit help load monitor show clone down export import modify reload up [[email protected] ~]# nmcli connection Edit con-name ens192 id type ens160 help path uuid [[email protected] ~]# nmcli connection add autoconnect ipv4.dns-prioritycon-name ipv4.dns-searchconnection.autoconnect ipv4.gatewayconnection.autoconnect-priority ipv4.ignore-auto-dnsconnection.autoconnect-slaves ipv4.ignore-auto-routesconnection.gateway-ping-timeout ipv4.may-failconnection.id ipv4.methodconnection.interface-name ipv4.never-defaultconnection.lldp ipv4.route-metricconnection.master ipv4.routesconnection.metered ipv6.addressesconnection.permissions ipv6.addr-gen-modeconnection.read-only ipv6.dhcp-hostnameconnection.secondaries Ipv6.dhcp-send-hostnameconnection.slave-type ipv6.dnsconnection.stable-id ipv6.dns-optionsconnection.timestamp ipv6.dns-priorityconnection.type ipv6.dns-searchconnection.uuid ipv6.gatewayconnection.zone ipv6.ignore-auto-dnshelp ipv6.ignore-auto-routesifname ipv6.ip6-privacyipv4.addresses ipv6.may-failipv4.dad-timeout ipv6.methodipv4.dhcp-client-id ipv6.never-defaultipv4.dhcp-fqdn ipv6.route-metricipv4.dhcp-hostname ipv6.routes--More--^C[[email protected] ~]# firewall-cmd ----add-forward-port=--add-icmp-block=--add-icmp-block-inversion--add-interface=-- add-lockdown-whitelist-command=--add-lockdown-whitelist-context=--add-lockdown-whitelist-uid=-- Add-lockdown-whitelist-user=--add-masquerade--add-port=--add-protocol=--add-rich-rule=--add-service=--add-source=--add-source-port=--change-interface=-- change-source=--change-zone=-- Complete-reload--direct--get-active-zones--get-default-zone--get-icmptypes--get-ipset-types--get-log-denied--get-services --get-zone-of-interface=--get-zones--help--info-icmptype--info-ipset--info-service--info-zone--more--[[email protected] ~]# firewall-cmd --
Linux command completion parameter hint program bash-completion