Using Linux Custom Auto-completion commands to improve your shell scripts, you will often write some general deployment scripts, such. /The java-build.sh project name will automatically pull the project from hg, and then maven compiled and deployed to the specified server, the whole process is automated through this shell script. Www.2cto.com, but sometimes the project name is too long to be remembered. At this time, you need Linux Custom Auto-completion functions. For example, if a project is called game-server, then I only need to enter. /java-build.sh g and then press tab to automatically complete. /java-build.sh game-server. Linux provides a Custom Auto-completion command, called complete. From man, we can see that this is a very complex command. However, most of the commands I can't use now only use one-W parameter, it means to write the command to complete, the usage of the entire command: complete-W "game-server game-web-server" java-build.sh and then write this command ~ /. Bashrc to initialize the shell environment.