ERROR
comment "# This file contains ffcast sub-command definitions."
comment "#"
comment "# To register a sub-command 'foo', you MUST add this,"
comment "#"
comment "# sub_commands['foo']='description'"
comment "#"
comment "# By default, running sub-command 'foo' will execute the fun"...
comment "# But you MAY explicitly associate sub-command 'foo' with fu"...
comment "#"
comment "# sub_cmdfuncs['foo']=bar"
comment "#"
comment "# This is useful in the cases when your sub-command isn't a "...
comment "# name, or when it conflicts with an existing function."
comment "#"
comment "# As this file is sourced after all the geometry processing "...
comment "# have access to, among others, the variables $rect_w $rect_"...
comment "# $rect_X $rect_Y and all the functions defined in ffcast."
comment "#"
comment "# The positional arguments to a sub-command function are all"...
comment "# after the sub-command as specified on the command line by "...
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'help'"
] "]"
= "="
raw_string "'print help for a sub-command, or list all sub-commands'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'help'"
] "]"
= "="
word "subcmd_help"
function_definition (+228 nodes collapsed)
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'%'"
] "]"
= "="
raw_string "'look up external command only; bypass sub-commands'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'%'"
] "]"
= "="
word "run_external_command"
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'dump'"
] "]"
= "="
raw_string "'dump region-related variables in bash code'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'dump'"
] "]"
= "="
word "subcmd_dump"
function_definition (+24 nodes collapsed)
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'each'"
] "]"
= "="
raw_string "'run a sub-command on each selection consecutively'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'each'"
] "]"
= "="
word "subcmd_each"
word "subcmd_each"
( "("
) ")"
{ "{"
command
command_name
word ":"
raw_string "'usage: each [sub-command]'"
declaration_command (+27 nodes collapsed)
declaration_command
local "local"
word "-a"
variable_name "__args"
declaration_command
local "local"
word "-i"
variable_name "n"
declaration_command
local "local"
variable_name "i"
variable_name "t"
for "for"
(( "(("
variable_assignment
variable_name "n"
= "="
number "0"
; ";"
binary_expression
word "n"
< "<"
expansion
${ "${"
# "#"
subscript
variable_name "rects"
[ "["
word "@"
] "]"
} "}"
; ";"
unary_expression
++ "++"
word "n"
)) "))"
; ";"
do "do"
declaration_command
local "local"
word "-n"
variable_assignment
variable_name "ref_rect"
= "="
expansion
${ "${"
subscript
variable_name "rects"
[ "["
word "n"
] "]"
} "}"
variable_assignment
variable_name "t"
= "="
expansion
${ "${"
subscript
variable_name "rects"
[ "["
word "n"
] "]"
%% "%%"
regex "\\[*"
} "}"
; ";"
variable_assignment
variable_name "t"
= "="
expansion
${ "${"
variable_name "t"
% "%"
regex "s"
} "}"
variable_assignment
variable_name "i"
= "="
expansion
${ "${"
subscript
variable_name "rects"
[ "["
word "n"
] "]"
# "#"
regex "*\\["
} "}"
; ";"
variable_assignment (+24 nodes collapsed)
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'abs'"
] "]"
= "="
raw_string "'swap corners to make region sizes non-negative'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'abs'"
] "]"
= "="
word "subcmd_abs"
function_definition (+84 nodes collapsed)
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'lag'"
] "]"
= "="
raw_string "'delay execution of a sub-command'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'lag'"
] "]"
= "="
word "subcmd_lag"
function_definition (+47 nodes collapsed)
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'move'"
] "]"
= "="
raw_string "'move region by x,y pixels'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'move'"
] "]"
= "="
word "subcmd_move"
function_definition (+100 nodes collapsed)
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'pad'"
] "]"
= "="
raw_string "'add CSS-style padding to region'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'pad'"
] "]"
= "="
word "subcmd_pad"
function_definition (+200 nodes collapsed)
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'png'"
] "]"
= "="
raw_string "'take a screenshot and save it as a PNG image'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'png'"
] "]"
= "="
word "subcmd_png"
function_definition (+161 nodes collapsed)
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'rec'"
] "]"
= "="
raw_string "'record a screencast'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'rec'"
] "]"
= "="
word "subcmd_rec"
function_definition (+240 nodes collapsed)
variable_assignment
subscript
variable_name "sub_commands"
[ "["
raw_string "'trim'"
] "]"
= "="
raw_string "'remove edges from region'"
variable_assignment
subscript
variable_name "sub_cmdfuncs"
[ "["
raw_string "'trim'"
] "]"
= "="
word "subcmd_trim"
word "subcmd_trim"
( "("
) ")"
{ "{"
command
command_name
word ":"
raw_string "'usage: trim [-f <n[%]>] [sub-command]'"
declaration_command
local "local"
word "-i"
variable_name "x"
variable_name "y"
declaration_command
local "local"
variable_name "f"
variable_name "opt"
variable_assignment
variable_name "OPTIND"
= "="
number "1"
while_statement (+28 nodes collapsed)
command
command_name
word "shift"
arithmetic_expansion
$(( "$(("
binary_expression
variable_name "OPTIND"
- "-"
number "1"
)) "))"
command
variable_assignment
variable_name "verbosity"
= "="
number "0"
command_name
word "subcmd_png"
word "-"
| "|"
command (+21 nodes collapsed)
| "|"
pipeline (+64 nodes collapsed)
comment "# vim:sw=4:et:cc=80:"