# evince(1) completion -*- shell-script -*- proc _evince { var cur = '', prev = '', words = '', cword = '', split = '' _init_completion -s || return matchstr $prev { --help*|-h|--sm-client-id|--class|--name|--screen|--gdk-debug|\ --gdk-no-debug|--gtk-module|--gtk-debug|--gtk-no-debug|\ -p|--page-label|-i|--page-index|-l|--find|--display { return } --sm-client-state-file { _filedir return } } $split && return 0 if [[ $cur == -* ]] { global COMPREPLY := '( '$( compgen -W '$( _parse_help "$1" --help-all )' \ -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace return } _filedir '@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2|.xz|.XZ)|cb[rz]|djv?(u)|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx)' } && complete -F _evince evince # ex: ts=4 sw=4 et filetype=sh (CommandList children: [ (AndOr children: [ (FuncDef name: _evince body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(LhsName name:cur) op:Equal spids:[13]) (assign_pair lhs:(LhsName name:prev) op:Equal spids:[15]) (assign_pair lhs:(LhsName name:words) op:Equal spids:[17]) (assign_pair lhs:(LhsName name:cword) op:Equal spids:[19]) (assign_pair lhs:(LhsName name:split) op:Equal spids:[21]) ] spids: [11] ) (AndOr children: [ (C {(_init_completion)} {(-s)}) (ControlFlow token:) ] op_id: Op_DPipe ) (Case to_match: {($ VSub_Name "$prev")} arms: [ (case_arm pat_list: [ {(--help) (Lit_Other "*")} {(-h)} {(--sm-client-id)} {(--class)} {(--name)} {(--screen)} {(--gdk-debug)} {(--gdk-no-debug)} {(--gtk-module)} {(--gtk-debug)} {(--gtk-no-debug)} {(-p)} {(--page-label)} {(-i)} {(--page-index)} {(-l)} {(--find)} {(--display)} ] action: [(ControlFlow token:)] spids: [41 81 87 -1] ) (case_arm pat_list: [{(--sm-client-state-file)}] action: [(C {(_filedir)}) (ControlFlow token:)] spids: [90 91 100 -1] ) ] spids: [34 38 103] ) (AndOr children: [ (C {($ VSub_Name "$split")}) (ControlFlow token: arg_word:{(0)}) ] op_id: Op_DAmp ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name "$cur")} right: {(-) (Lit_Other "*")} ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [ { (CommandSubPart command_list: (CommandList children: [ (C {(compgen)} {(-W)} {(SQ <"$( _parse_help \"$1\" --help-all )">)} {(--)} {(DQ ($ VSub_Name "$cur"))} ) ] ) left_token: spids: [137 155] ) } ] ) } spids: [134] ) ] spids: [134] ) (AndOr children: [ (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name "$COMPREPLY")} right: {(Lit_Other "*") (BoolBinary_GlobEqual "=")} ) ) (C {(compopt)} {(-o)} {(nospace)}) ] op_id: Op_DAmp ) (ControlFlow token:) ] spids: [-1 131] ) ] spids: [-1 183] ) (C {(_filedir)} { (SQ < "@(@(?(e)ps|?(E)PS|[pf]df|[PF]DF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2|.xz|.XZ)|cb[rz]|djv?(u)|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx)" > ) } ) ] spids: [8] ) spids: [4 7] ) (C {(complete)} {(-F)} {(_evince)} {(evince)}) ] op_id: Op_DAmp ) ] )