(command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _svk body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(lhs_expr.LhsName name:cur) op:Equal) (assign_pair lhs:(lhs_expr.LhsName name:prev) op:Equal) (assign_pair lhs:(lhs_expr.LhsName name:words) op:Equal) (assign_pair lhs:(lhs_expr.LhsName name:cword) op:Equal) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(_init_completion)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(lhs_expr.LhsName name:commands) op:Equal) (assign_pair lhs:(lhs_expr.LhsName name:options) op:Equal) (assign_pair lhs:(lhs_expr.LhsName name:command) op:Equal) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:commands) op: Equal rhs: { (SQ <'add admin annotate ann blame praise cat checkout co cleanup\n'> < ' cmerge cm commit ci copy cp delete del remove rm depotmap depot\n' > <' describe desc diff di help h ? import info list ls log merge mirror mi\n'> < ' mkdir move mv ren rename patch propdel pd pdel propedit pe pedit\n' > <' propget pg pget proplist pl plist propset ps pset pull push resolved\n'> < ' revert smerge sm status st stat switch sw sync sy update up verify' > ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_eq left: {($ VSub_DollarName '$cword')} right: {(1)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(-) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <--version>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ] ) } ) ] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$commands'))} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ] ) } ) ] ) ] ) ] ) ] else_action: [ (command.Case to_match: {($ VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(-F)} {(--file)} {(--targets)}] action: [ (C {(_filedir)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (case_arm pat_list: [{(--encoding)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'$( iconv --list | sed -e "s@//@@;" )'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ] ) } ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:command) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(-) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Case to_match: {($ VSub_DollarName '$command')} arms: [ (case_arm pat_list: [{(add)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <' --non-recursive -N -q --quiet'>)} ) ] ) ] ) (case_arm pat_list: [{(blame)} {(annotate)} {(ann)} {(praise)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-r --revisions -x --cross'>)} ) ] ) ] ) (case_arm pat_list: [{(cat)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-r --revision'>)} ) ] ) ] ) (case_arm pat_list: [{(checkout)} {(co)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-r --revision -q --quiet -N --non-recursive -l\n'> < ' --list -d --detach --export --relocate --purge' > ) } ) ] ) ] ) (case_arm pat_list: [{(cleanup)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-a --all'>)} ) ] ) ] ) (case_arm pat_list: [{(cmerge)} {(cm)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-c --change -l --log -r --revision -a --auto\n'> < ' --verbatim --no-ticket -m --message -F --file\n' > <' --template --encoding -P --patch -S --sign -C\n'> <' --check-only --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(commit)} {(ci)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'--import -m --message -F --file --encoding\n'> < ' --template -P --patch -S --sign -C --check-only -N\n' > <' --non-recursive --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(copy)} {(cp)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-r --revision -p --parent -q --quiet -m --message\n'> < ' -F --file --template --encoding -P --patch -S --sign -C\n' > <' --check-only --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(delete)} {(del)} {(remove)} {(rm)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-k --keep-local -m --message -F --file --encoding\n'> < ' --template -P --patch -S --sign -C --check-only\n' > <' --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(depotmap)} {(depot)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-i --init -l --list -d --detach --relocate'>)} ) ] ) ] ) (case_arm pat_list: [{(diff)} {(di)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-r --revision -s --summarize -b --verbose -N\n'> <' --non-recursive'> ) } ) ] ) ] ) (case_arm pat_list: [{(import)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-f --from-checkout -t --to-checkout -m --message\n'> < ' -F --file --template --encoding -P --patch -S --sign -C\n' > <' --check-only -N --non-recursive --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(list)} {(ls)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-r --revision -v --verbose -R --recursive -d\n'> <' --depth -f --full-path'> ) } ) ] ) ] ) (case_arm pat_list: [{(log)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-r --revision -l --limit -q --quiet -x --cross -v\n'> <' --verbose'> ) } ) ] ) ] ) (case_arm pat_list: [{(merge)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-r --revision -c --change -I --incremental -a\n'> < ' --auto -l --log -s --sync -t --to -f --from --verbatim\n' > <' --no-ticket --track-rename -m --message -F --file\n'> < ' --template --encoding -P --patch -S --sign -C\n' > <' --check-only --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(mirror)} {(mi)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-l --list -d --detach --relocate --recover\n'> <' --unlock --upgrade'> ) } ) ] ) ] ) (case_arm pat_list: [{(mkdir)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-p --parent -m --message -F --file --template\n'> < ' --encoding -P --patch -S --sign -C --check-only\n' > <' --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(move)} {(mv)} {(rename)} {(ren)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-r --revision -p --parent -q --quiet -m --message\n'> < ' -F --file --encoding --template -P --patch -S --sign -C\n' > <' --check-only --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(patch)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <--depot>)} ) ] ) ] ) (case_arm pat_list: [{(propdel)} {(propset)} {(pdel)} {(pset)} {(pd)} {(ps)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-R --recursive -r --revision --revprop -m\n'> < ' --message -F --file --template --encoding -P --patch -S\n' > <' --sign -C --check-only -q --quiet --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(propedit)} {(pedit)} {(pe)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-R --recursive -r --revision --revprop -m\n'> < ' --message -F --file --template --encoding -P --patch\n' > <' -S --sign -C --check-only --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(propget)} {(pget)} {(pg)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-R --recursive -r --revision --revprop --strict'>)} ) ] ) ] ) (case_arm pat_list: [{(proplist)} {(plist)} {(pl)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-R --recursive -v --verbose -r --revision\n'> <' --revprop'> ) } ) ] ) ] ) (case_arm pat_list: [{(pull)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-a --all -l --lump'>)} ) ] ) ] ) (case_arm pat_list: [{(push)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-f --from -l --lump -C --check -P --patch -S\n'> <' --sign --verbatim'> ) } ) ] ) ] ) (case_arm pat_list: [{(resolved)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-R --recursive'>)} ) ] ) ] ) (case_arm pat_list: [{(revert)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-R --recursive -q --quiet'>)} ) ] ) ] ) (case_arm pat_list: [{(smerge)} {(sm)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-I --incremental -l --log -B --baseless -b --base\n'> < ' -s --sync -t --to -f --from --verbatim --no-ticket\n' > <' --track-rename --host --remoterev -m --message -F\n'> < ' --file --template --encoding -P --patch -S --sign -C\n' > <' --check-only --direct'> ) } ) ] ) ] ) (case_arm pat_list: [{(status)} {(stat)} {(st)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-q --quiet --no-ignore -N --non-recursive -v\n'> <' --verbose'> ) } ) ] ) ] ) (case_arm pat_list: [{(switch)} {(sw)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-r --revision -d --detach -q --quiet'>)} ) ] ) ] ) (case_arm pat_list: [{(sync)} {(sy)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: {(SQ <'-a --all -s --skipto -t --torev'>)} ) ] ) ] ) (case_arm pat_list: [{(update)} {(up)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: Equal rhs: { (SQ <'-r --revision -N --non-recursive -C --check-only\n'> < ' -s --sync -m --merge -q --quiet' > ) } ) ] ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options) op: PlusEqual rhs: {(DQ (' --help -h'))} ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$options'))} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ] ) } ) ] ) ] ) ] else_action: [ (command.Case to_match: {($ VSub_DollarName '$command')} arms: [ (case_arm pat_list: [ {(help)} {(h)} {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\?'>)} ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (DQ ($ VSub_DollarName '$commands') (' environment commands\n') (' intro') ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ] ) } ) ] ) ] ) (case_arm pat_list: [{(admin)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ <'help deltify dump hotcopy\n'> < ' list-dblogs list-unused-dblogs load lstxns recover\n' > <' rmtxns setlog verify rmcache'> ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ] ) } ) ] ) ] ) (case_arm pat_list: [{(patch)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ <'--ls --list --cat --view\n'> < ' --regen --regenerate --up --update --apply --rm\n' > <' --delete'> ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ] ) } ) ] ) ] ) (case_arm pat_list: [{(sync)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.SimpleCommand words: [ {($ VSub_Number '$1')} {(mirror)} {(--list)} ] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(awk)} {(SQ <'/^\\//{print $1}'>)} ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ] ) } ) ] ) ] ) (case_arm pat_list: [{(co)} {(checkout)} {(push)} {(pull)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(//) (Lit_Other '*') (/) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:path) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name cur> suffix_op: (suffix_op.StringUnary op_id: VOp1_Percent arg_word: {(Lit_Slash /) ('*')} ) ) (/) } ) ] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:path) op: Equal rhs: {(//)} ) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.SimpleCommand words: [ {($ VSub_Number '$1')} {(list)} { ($ VSub_DollarName '$path' ) } ] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(sed)} {(-e)} {(SQ <'s|\\(.*\\)|'>) ($ VSub_DollarName '$path') (SQ <'\\1|'>) } ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ] ) } ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(_filedir)})] ) ] ) ] ) ] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] ) ) (C {(complete)} {(-F)} {(_svk)} {(svk)}) ] )