The attached Bash script adds support for tab completion of most arguments to the main Hadoop script (bin/hadoop). Namely, it allows tab completion of all the command names, subcommands for the fs, dfsadmin, job, namenode and pipe commands, arguments of the jar command and most arguments to the fs subcommands (completing local and dfs paths as appropriate).
The file can be dropped into /etc/bash_completion.d/ on Debian-like distros, and it should then start working the next time Bash is started.
- is related to
HADOOP-10998 Fix bash tab completion code to work