hush: support ${var:EXPR:EXPR}!
function old new delta handle_dollar 574 681 +107 expand_and_evaluate_arith - 77 +77 expand_vars_to_list 2302 2374 +72 add_till_closing_bracket 359 368 +9 builtin_exit 48 47 -1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/1 up/down: 265/-1) Total: 264 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -39,3 +39,13 @@ f:1:2=|12|
|
||||
f::2 =|01|
|
||||
f:1: =||
|
||||
f:: =||
|
||||
Substrings with expressions
|
||||
f =|01234567|
|
||||
f:1+1:2+2 =|2345|
|
||||
f:-1:2+2 =|01234567|
|
||||
f:1:f =|1234567|
|
||||
f:1:$f =|1234567|
|
||||
f:1:${f} =|1234567|
|
||||
f:1:${f:3:1} =|123|
|
||||
f:1:1`echo 1`=|1|
|
||||
Done
|
||||
|
||||
Reference in New Issue
Block a user