Bug 950957 - Use ${COMP_WORDS[0]} for completion in mach. r=gps

This commit is contained in:
Martin Thomson
2013-12-19 11:42:19 -05:00
parent 86bab06b58
commit 0b7d70e8d4

View File

@@ -1,11 +1,10 @@
function _mach()
{
local cur cmds c subcommand mach
local cur cmds c subcommand
COMPREPLY=()
# Load the list of commands
mach=`which mach || echo ./mach`
cmds=`$mach mach-commands`
cmds=`"${COMP_WORDS[0]}" mach-commands`
# Look for the subcommand.
cur="${COMP_WORDS[COMP_CWORD]}"