Bug 950957 - Use ${COMP_WORDS[0]} for completion in mach. r=gps
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
function _mach()
|
function _mach()
|
||||||
{
|
{
|
||||||
local cur cmds c subcommand mach
|
local cur cmds c subcommand
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
|
|
||||||
# Load the list of commands
|
# Load the list of commands
|
||||||
mach=`which mach || echo ./mach`
|
cmds=`"${COMP_WORDS[0]}" mach-commands`
|
||||||
cmds=`$mach mach-commands`
|
|
||||||
|
|
||||||
# Look for the subcommand.
|
# Look for the subcommand.
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user