# newgrp(1) completion -*- shell-script -*- # Use of this file is deprecated on Linux. Upstream completion is # available in util-linux >= 2.23, use that instead. proc _newgrp { var cur = '', prev = '', words = '', cword = '' _init_completion || return if [[ "$cur" == "-" ]] { global COMPREPLY := '( '- ) } else { _allowed_groups $cur } } && complete -F _newgrp newgrp # ex: ts=4 sw=4 et filetype=sh (CommandList children: [ (AndOr children: [ (FuncDef name: _newgrp body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(LhsName name:cur) op:Equal spids:[20]) (assign_pair lhs:(LhsName name:prev) op:Equal spids:[22]) (assign_pair lhs:(LhsName name:words) op:Equal spids:[24]) (assign_pair lhs:(LhsName name:cword) op:Equal spids:[26]) ] spids: [18] ) (AndOr children: [(C {(_init_completion)}) (ControlFlow token:)] op_id: Op_DPipe ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name "$cur"))} right: {(DQ (-))} ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: {(ArrayLiteralPart words:[{(-)}])} spids: [57] ) ] spids: [57] ) ] spids: [-1 54] ) ] else_action: [(C {(_allowed_groups)} {(DQ ($ VSub_Name "$cur"))})] spids: [65 75] ) ] spids: [15] ) spids: [11 14] ) (C {(complete)} {(-F)} {(_newgrp)} {(newgrp)}) ] op_id: Op_DAmp ) ] )