-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathargfunction.basic-result
More file actions
721 lines (675 loc) · 26.4 KB
/
argfunction.basic-result
File metadata and controls
721 lines (675 loc) · 26.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
init file /non-existent/file/to/test/failure does not exist
call stack .source .try_catch_recursive(body)
.global A \
.set SHELL /bin/rwsh
.nop .function .run_logic -- cmd [args ...] {.nop
.signal_handler &{.internal_functions}$ {&&* {.argfunction}}
.mapped_argfunction {&&* {.argfunction}}
&&* {.argfunction}}
.function .before_command -- args ... [.{argfunction}] {.nop $args}
.function .after_command -- args ... [.{argfunction}] {.nop $args}
.function .prompt {.echo \$}
.function .vars {.internal_vars}
.source /etc/rwshrc-basic $argv$
#! /bin/rwsh --init-file
.function () {.nop}
.function # -- [ignored ...] [.{argfunction}] {.nop $ignored$}
.function fn -- prototype ... .{argfunction} {
.function $prototype$ {.argfunction}}
# set up environment
.set_max_collectible_exceptions 10
.set_max_extra_exceptions 5
.global nl (
)
.if .var_exists ? {}
.else {.global ? (); .nop $?}
.nop $FIGNORE
# internal functions
.function .ambiguous_prototype_dash_dash prototype stack ... {
.echo $prototype is an ambiguous location for a prototype --
.combine ( (it requests reading the user's mind) ) \( stack: $stack \) $nl}
.function .arguments_for_argfunction name {
echo cannot specify arguments for $name directly}
.function .bad_argfunction_style style {
echo $style is neither an argfunction nor a substitution nor a brace literal}
.function .bad_args -- proto assigned needed excess call_stack ... {
.combine (unacceptable arguments: for prototype ) $proto , $nl
if_only .test_not_empty $assigned {
.combine ( assigned )
.for $assigned$ (-- var val) {.combine $var = ${paren_if_words $val} ( )}
.combine , $nl ( but)}
if_only .test_not_empty $needed {
.combine ( needed \() $needed \), $nl
if_only .test_not_empty $excess {.combine ( and)}}
if_only .test_not_empty $excess {
.combine ( found \() $excess (\) excess) $nl}
echo \ call stack: $call_stack}
.function .bad_if_nest stack ... {
echo nested .if without .else with call stack: $stack$}
.function .binary_does_not_exist name [stack ...] {
echo $name : binary does not exist
if_only .var_exists stack {echo call stack: $stack}}
.function .binary_not_found name path stack ... {
echo $name : binary not found in $path
echo call stack: $stack$}
.function .break stack ... {
echo .break thrown outside of control flow body
echo call stack: $stack$}
.function .continue stack ... {
echo .continue thrown outside of control flow body
echo call stack: $stack$}
.function .dash_dash_argument args stack ... {
echo optional -- parameter cannot take arguments \( $args \) with call stack: $stack$}
.function .dash_star_argument args stack ... {
echo optional -* parameter cannot take arguments \( $args \) with call stack: $stack$}
.function .directory_not_found -- dir stack ... {
.combine $dir ( directory does not exist) $nl
echo call stack $stack}
.function .divide_by_zero numerator stack ... {
echo attempt to divide $numerator by 0 with call stack: $stack$}
.function .double_redirection first second [stack ...] {
echo double redirection is not supported at this time: $first and $second
if_only .var_exists stack {echo call stack: $stack$}}
.function .duplicate_parameter -- parameter stack ... {
echo duplicated parameter in function definition: $parameter
echo call stack: $stack$}
.function .elipsis_first_arg -- elipsis stack ... {
echo $elipsis elipsis cannot be the first argument in a prototype
echo call stack: $stack$}
.function .elipsis_out_of_option_group -- group stack ... {
echo $group for elipsis to apply to option it must occur within the brackets
echo call stack: $stack$}
.function .else_without_if stack ... {
echo else without if with call stack: $stack$}
.function .epsilon var_val change stack ... {
echo $change is too small relative to $var_val to modify its value
echo call stack: $stack$}
.function .excess_argfunction cmd [stack ...] {
echo $cmd does not accept an argfunction with call stack: $cmd $stack$}
.function .excessive_exceptions_collected max stack ... {
echo exceeded maximum number of exceptions \( $max \) in collect_errors.
echo call stack: $stack$}
.function .excessive_exceptions_in_catch max stack ... {
echo exceeded maximum number of exceptions \( $max \) in try_catch.
echo call stack: $stack$}
.function .excessive_nesting stack ... {
echo function exceeded max nesting \( ${.get_max_nesting} \). call stack: $stack}
.function .exec_failed binary errno stack ... {
.combine (.exec failed for ) $binary ( with errno ) $errno $nl
echo call stack $stack}
.function .executable_already_exists -- binary stack ... {
echo $binary is already an executable in the hash table $nl
echo call stack $stack}
.function .failed_substitution substitution [stack ...] {
echo substitution $substitution failed
if_only .var_exists stack {echo call stack: $stack$}}
.function .false test [stack ...] {
echo assertion $test failed
echo call stack $stack$}
.function .file_not_found -- file stack ... {
echo could not find file $file
echo call stack $stack}
.function .file_open_failure -- file stack ... {
echo could not open file $file
echo call stack $stack}
.function .fixed_argument -- arg stack ... {
echo $arg : fixed arguments are not supported at this time
echo call stack $stack}
.function .flag_in_elipsis -- flag stack ... {
echo found flag $flag while collecting arguments for elipsis
echo call stack $stack$}
.function .function_not_found -- cmd [stack ...] {
echo $cmd : command not found \( $cmd $stack$ \)}
.function .global_would_be_masked name stack ... {
.echo requested global $name already exists as a local
echo . It would be masked by the local and inaccessible from here
echo call stack $stack$}
.function .help [args ...] {
.nop $args$
.echo this is the default configuration for rwsh \(or something copied from it
echo \), documentation should be available at rwsh.sf.net or rwsh.org}
.function .if_before_else stack ... {
echo two .if commands without a .else between them with call stack : $stack$}
.function .illegal_function_name name stack ... {
.combine \$ $name ( cannot be a function) $nl
echo call stack $stack}
.function .illegal_variable_name name stack ... {
.combine \$ $name ( cannot be set) $nl
echo call stack $stack}
.function .input_range -- value stack ... {
echo value $value is out of usable numeric range
echo call stack $stack$}
.function .internal_error -- [args ...] {
echo internal error: $args$}
.function .interrupted_sleep [stack ...] {
echo sleep was interrupted
echo call stack $stack$}
.function .invalid_word_selection selection [stack ...] {
echo $selection is not a valid word selection
echo call stack $stack$}
.function .mismatched_brace context [stack ...] {
echo mismatched brace: $context $stack$}
.function .mismatched_bracket context [stack ...] {
echo mismatched bracket: $context
if_only .var_exists stack {echo call stack: $stack$}}
.function .mismatched_parenthesis string [stack ...] {
.echo signal triggered: $0 \( $string $stack$ \); .combine $nl
echo mismatched parenthesis: $string
echo call stack: $stack$}
.function .unclosed_parenthesis string [stack ...] {
.echo signal triggered: $0 \( $string $stack$ \); .combine $nl
echo mismatched parenthesis: $string
echo call stack: $stack$}
.function .missing_argfunction cmd [add_stack ...] {
echo $cmd requires an argfunction
if_only .var_exists add_stack {echo stack $add_stack$}}
.function .multiple_argfunctions {
echo multiple argfunctions not supported at this time}
.function .not_a_directory file stack ... {
.combine $file ( is not a directory) $nl
echo call stack $stack}
.function .not_a_function executable stack ... {
.combine $executable ( is not a function) $nl
echo call stack $stack}
.function .not_a_number -- nan stack ... {
echo $nan is not a number
echo call stack: $stack$}
.function .not_catching_exception stack ... {
echo .replace_exception called outside of an exception handler
echo call stack: $stack$}
.function .not_executable file stack ... {
echo $file is not executable
echo call stack: $stack$}
.function .not_soon_enough too_late [stack ...] {
echo $too_late attempts to substitute after the command has been run
if_only .var_exists stack {echo call stack $stack}}
.function .post_elipsis_option -- flag stack ... {
echo option $flag coming after an elipsis has no meaning
echo call stack: $stack$}
.function .post_dash_dash_flag -- flag stack ... {
echo flag option $flag occurs after -- in the prototype
echo call stack: $stack$}
.function .prompt {.echo \$}
.function .result_range -- lhs rhs op [stack ...] {
echo result of $op with arguments $lhs and $rhs is out of range
echo call stack: $op $stack$}
.function .return_code code cmd [add_stack ...] {
.if .test_in $cmd /usr/bin/test /bin/false {
.replace_exception .false $cmd
.nop $code $add_stack$}
.else {
.set ? $cmd returned $code
echo $?$ : call stack $cmd $add_stack$}}
.function .selection_not_found not_found selection [stack ...] {
.echo no file matching pattern $not_found
if_only .test_string_unequal $not_found $selection {
.echo () for selection $selection}
.echo $nl
if_only .var_exists stack {echo call stack: $stack$}}
.function .sigcont {
echo received SIGCONT}
.function .sigchld {
echo received SIGCHLD}
.function .sighup {
echo received SIGHUP}
.function .sigint {
.throw echo $nl received SIGINT}
.function .sigquit {
echo received SIGQUIT}
.function .sigpipe {
echo received SIGPIPE}
.function .sigterm {
.throw echo $nl received SIGTERM}
.function .sigtstp {
echo received SIGTSTP}
.function .siginfo {
echo received SIGINFO}
.function .sigusr1 {
echo received SIGUSR1}
.function .sigusr2 {
echo received SIGUSR2}
.function .sigunknown {
echo received unknown unix signal}
.function .shutdown -- [args ...] {.nop $args}
.function .tardy_flag -- flag stack ... {
echo $flag flag comes too late in command
echo call stack: $stack$}
.function .unchecked_variable -- var [stack ...] {
echo $var was not checked with call stack $stack$}
.function .unclosed_brace context [stack ...] {
echo unclosed brace: $context $stack$}
.function .undeclared_variable -- name [stack ...] {
echo $name was not declared
echo call stack: $stack$}
.function .undefined_variable -- name [stack ...] {
echo optional variable $name was not defined
echo call stack: $stack$}
.function .unfinished_if_block [stack ...] {
echo conditional not finished within preceeding block
if_only .var_exists stack {echo call stack: $stack$}}
.function .unreadable_dir dir errno [stack ...] {
.combine (cannot read directory ) $dir \ \(errno\ $errno \) $nl
echo call stack: $stack$}
.function .unrecognized_flag -- flag cmd [add_stack ...] {
echo $flag flag is unrecognized for $cmd
echo call stack: $cmd $add_stack$}
.function .unused_before_set -- var [stack ...] {
echo attempt to set $var before making use of its initial value
echo call stack $stack$}
.function .unused_variable -- var [stack ...] {
echo $var was unused with call stack $stack$}
.function .variable_already_exists name stack ... {
echo variable $name already exists
echo call stack $stack$}
.function .version_incompatible version stack ... {
echo this shell is not compatible with requested version $version
echo call stack: $stack$}
# ability of functions to act as builtin wrappers
fn ! args ... {
.if $args$ {.throw .false ${.echo ! $args}}
.else {.nop}}
fn af -- [argv ...] .{argfunction} {.argfunction}
fn c -- text ... {.combine $text$}
fn e -- text ... {.echo $text}
fn do_while argv ... .{argfunction} {
.try_catch_recursive .break {
.nop $argv
.try_catch_recursive .continue {.argfunction}
.while $argv$ {.argfunction}}}
fn echo -- text ... {.echo $text; .combine $nl}
fn echo-comments argv ... {
.stepwise $argv$ (-- cmd [args ...]) {.nop $args$
if_only .test_in $cmd .nop # #! ## {echo &&&*}}}
fn exec -- argv ... {.exec $argv$}
fn elif command ... .{argfunction} {
.else_if $command$ {.argfunction}}
fn else .{argfunction} {.else {.argfunction}}
fn fns -- name args ... .{argfunction} {fn $name [-?] $args$ {.argfunction}}
fn if_only -- args ... .{argfunction} {
.if $args$ {.argfunction}; .else {.nop}}
fn if_only_not -- args ... .{argfunction} {
.if $args$ {.nop}; .else {.argfunction}}
fn ntimes n .{argfunction} {
.while test_var_greater n 0 {
.mapped_argfunction {.argfunction}
.var_subtract n 1}}
fn outer_break stack ... {.replace_exception .break $stack$}
fn outer_continue stack ... {.replace_exception .continue $stack$}
fn forj -- [vals ...] .{argfunction} {.for $vals$ (-- j) {.argfunction}}
fn foreok -- [items ...] prototype .{argfunction} {
.if .var_exists items {.for $items$ $prototype {.argfunction}}
.else {.nop $prototype}}
fn outer_for -- vals ... var .{argfunction} {
.for $vals$ $var {
.try_catch_recursive outer_break outer_continue {.argfunction}}}
fn outer_while -- argv ... .{argfunction} {
.while $argv$ {
.try_catch_recursive outer_break outer_continue {.argfunction}}}
fn setf -- var value {
.if .var_exists $var {.set $var $value}
.else {.global $var $value}}
fn single -- args ... {.scope ${$args$}$ result {echo $result}}
fn test_var_not_equal var value {.test_string_unequal $$var $value}
fn test_var_greater -- var value {.test_greater $$var $value}
fn type [-t] args ... [.{argfunction}] {
.for $args$ (-- name ...) {
.try_catch_recursive .function_not_found {
if_only_not .var_exists -t {.echo &&&name is ()}
.type &&&1 {.argfunction}}}}
fn whence command [.{argfunction}] {
.try_catch_recursive .function_not_found {
.whence_function $command {.argfunction}}}
fn whichp binary {.which_path $binary $PATH}
fn while_and_one_more argv ... .{argfunction} {
.try_catch_recursive .break {
.while $argv$ {.argfunction}
.try_catch_recursive .continue {.argfunction}}}
fn var_exists -- var {.var_exists $var}
fn var_in var set ... {.test_in $$var $set$}
fn var_less var N {.test_less $$var $N}
fn var_val -- [vars ...] {
.if .var_exists vars {.for $vars$ (-- v ...) {.combine $v \( $$v \) \ }}
.else {.nop}}
fn paren_if_words -- value {
.if .test_number_equal ${.argc $value$} 1 {.combine $value}
.else {.combine \( $value \)}}
fn polish -- operator builtin {
fn &&operator -- lhs rhs ... {
if_only .test_in $lhs + - / * {
.scope ${$lhs $rhs$}$ (-- l r ...) {
.set lhs $l
.set rhs $r}}
.scope $rhs$ (rhs [extra ...]) {
.if .test_in $rhs + - / * {
.scope ${$rhs $extra$}$ (rhs [extra ...]) {
&&builtin lhs $rhs
echo $lhs $extra$}}
.else {
&&builtin lhs $rhs
echo $lhs $extra$}}}}
polish + .var_add
polish / .var_divide
polish * .var_multiply
polish - .var_subtract
# external commands tested in the test suite
fn false {.try_catch_recursive .return_code {${whichp false}}}
fn ln [-?] [-t directory] target ... {
.nop $-* $target # in case the following assertion fails
.fork .mapped_argfunction {
if_only .var_exists -t {.cd $directory}
.for $target$ (-- j ...) {.test_file_exists $j}
&{.which_path ln /bin:/usr/bin} $-? -t . $target$}}
fn test -- args ... {.try_catch_recursive .return_code {${whichp test} $args$}}
if_only .var_exists argv {.error ignored excess arguments $argv $nl}
.function .shutdown -- args ... {
.nop $args
.combine $nl (now terminating normally) $nl}
$.echo $nl $nl $nl $nl
$.function fw .{argfunction} {
.function f1 name .{argfunction} {.argfunction}
.whence_function f1; .echo $nl
f1 f2 {.argfunction}
.whence_function f2; .echo $nl
.rm_executable f1; .rm_executable f2}
$fw {.echo hi $nl; .function $name .{argfunction} {.argfunction}}
.function f1 name .{argfunction} {.echo hi $nl; .function $name .{argfunction} {.argfunction}}
hi
.function f2 .{argfunction} {.echo hi $nl; .function $name .{argfunction} {.argfunction}}
$fw {.while .throw .false {
.function &&name .{argfunction} {.argfunction}}}
.function f1 name .{argfunction} {.while .throw .false {
.function &name .{argfunction} {.argfunction}}}
f2 : command not found ( f2 .whence_function fw )
$.function f1 name .{argfunction} {
.echo function name $name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}
$f1 f2 {
.echo noname $1 $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of nothing $nl}
function name f2
{
.echo noname $1 $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of nothing $nl}
end of function body
$fw {
.echo function name $name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}
.function f1 name .{argfunction} {
.echo function name $name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}
function name f2
{
.echo function name $name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}
end of function body
f2 : command not found ( f2 .whence_function fw )
$fw {forj 1 2 3 {
.echo function name $j $name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
.function f1 name .{argfunction} {forj 1 2 3 {
.echo function name $j $name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
function name 1 f2
{forj 1 2 3 {
.echo function name $j $name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}
end of function body
function name 2 f2
{forj 1 2 3 {
.echo function name $j $name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}
end of function body
function name 3 f2
{forj 1 2 3 {
.echo function name $j $name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}
end of function body
f2 : command not found ( f2 .whence_function fw )
$fw {forj 1 2 3 {.mapped_argfunction $j {
.echo function name &&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
.function f1 name .{argfunction} {forj 1 2 3 {.mapped_argfunction $j {
.echo function name &name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
function name f2
{forj 1 2 3 {.mapped_argfunction $j {
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
end of function body
function name f2
{forj 1 2 3 {.mapped_argfunction $j {
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
end of function body
function name f2
{forj 1 2 3 {.mapped_argfunction $j {
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
end of function body
f2 : command not found ( f2 .whence_function fw )
$# all of the above make sense, and the next should be identical to the last
$fw {.mapped_argfunction $1 {forj 1 2 3 {.nop $j
.echo function name &&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
.function f1 name .{argfunction} {.mapped_argfunction $1 {forj 1 2 3 {.nop $j
.echo function name &name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
function name f2
{.mapped_argfunction $1 {forj 1 2 3 {.nop $j
.echo function name &name $nl
.whence_function .argfunction {forj 1 2 3 {.nop $j
.echo function name f2 $nl
.whence_function .argfunction {.mapped_argfunction $1 {forj 1 2 3 {.nop $j
.echo function name &&&&&&name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
.echo $nl end of function body $nl}}
.echo $nl end of function body $nl}}}
end of function body
function name f2
{.mapped_argfunction $1 {forj 1 2 3 {.nop $j
.echo function name &name $nl
.whence_function .argfunction {forj 1 2 3 {.nop $j
.echo function name f2 $nl
.whence_function .argfunction {.mapped_argfunction $1 {forj 1 2 3 {.nop $j
.echo function name &&&&&&name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
.echo $nl end of function body $nl}}
.echo $nl end of function body $nl}}}
end of function body
function name f2
{.mapped_argfunction $1 {forj 1 2 3 {.nop $j
.echo function name &name $nl
.whence_function .argfunction {forj 1 2 3 {.nop $j
.echo function name f2 $nl
.whence_function .argfunction {.mapped_argfunction $1 {forj 1 2 3 {.nop $j
.echo function name &&&&&&name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
.echo $nl end of function body $nl}}
.echo $nl end of function body $nl}}}
end of function body
f2 : command not found ( f2 .whence_function fw )
$# mostly as wierd
$fw {.mapped_argfunction .not_a_number {
.echo function name &&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
.function f1 name .{argfunction} {.mapped_argfunction .not_a_number {
.echo function name &name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
function name f2
{.mapped_argfunction .not_a_number {
.echo function name &name $nl
.whence_function .argfunction {
.echo function name f2 $nl
.whence_function .argfunction {.mapped_argfunction .not_a_number {
.echo function name &&&&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
.echo $nl end of function body $nl}
.echo $nl end of function body $nl}}
end of function body
f2 : command not found ( f2 .whence_function fw )
$# normal again
$fw {.try_catch_recursive .not_a_number {
.echo function name &&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
.function f1 name .{argfunction} {.try_catch_recursive .not_a_number {
.echo function name &name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
function name f2
{.try_catch_recursive .not_a_number {
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}
end of function body
f2 : command not found ( f2 .whence_function fw )
$fw {forj 1 2 3 {.try_catch_recursive .not_a_number {
.nop $j
.echo function name &&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
.function f1 name .{argfunction} {forj 1 2 3 {.try_catch_recursive .not_a_number {
.nop $j
.echo function name &name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
function name f2
{forj 1 2 3 {.try_catch_recursive .not_a_number {
.nop $j
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
end of function body
function name f2
{forj 1 2 3 {.try_catch_recursive .not_a_number {
.nop $j
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
end of function body
function name f2
{forj 1 2 3 {.try_catch_recursive .not_a_number {
.nop $j
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
end of function body
f2 : command not found ( f2 .whence_function fw )
$fw {.try_catch_recursive .not_a_number {forj 1 2 3 {.nop $j
.echo function name &&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
.function f1 name .{argfunction} {.try_catch_recursive .not_a_number {forj 1 2 3 {.nop $j
.echo function name &name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
function name f2
{.try_catch_recursive .not_a_number {forj 1 2 3 {.nop $j
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
end of function body
function name f2
{.try_catch_recursive .not_a_number {forj 1 2 3 {.nop $j
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
end of function body
function name f2
{.try_catch_recursive .not_a_number {forj 1 2 3 {.nop $j
.echo function name &name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
end of function body
f2 : command not found ( f2 .whence_function fw )
$# maybe weird?
$fw {.mapped_argfunction $1 {
.echo function name &&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
.function f1 name .{argfunction} {.mapped_argfunction $1 {
.echo function name &name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
function name f2
{.mapped_argfunction $1 {
.echo function name &name $nl
.whence_function .argfunction {
.echo function name f2 $nl
.whence_function .argfunction {.mapped_argfunction $1 {
.echo function name &&&&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}
.echo $nl end of function body $nl}
.echo $nl end of function body $nl}}
end of function body
f2 : command not found ( f2 .whence_function fw )
$# definitely weird
$fw {.mapped_argfunction $name {forj a b {.nop $j
.echo function name &&name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
.function f1 name .{argfunction} {.mapped_argfunction $name {forj a b {.nop $j
.echo function name &name $nl
.whence_function .argfunction {.argfunction}
.echo $nl end of function body $nl}}}
function name f2
{.mapped_argfunction $name {forj a b {.nop $j
.echo function name &name $nl
.whence_function .argfunction {forj a b {.nop $j
.echo function name f2 $nl
.whence_function .argfunction {.mapped_argfunction $name {forj a b {.nop $j
.echo function name &&&&&&name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
.echo $nl end of function body $nl}}
.echo $nl end of function body $nl}}}
end of function body
function name f2
{.mapped_argfunction $name {forj a b {.nop $j
.echo function name &name $nl
.whence_function .argfunction {forj a b {.nop $j
.echo function name f2 $nl
.whence_function .argfunction {.mapped_argfunction $name {forj a b {.nop $j
.echo function name &&&&&&name $nl
.whence_function .argfunction
.echo $nl end of function body $nl}}}
.echo $nl end of function body $nl}}
.echo $nl end of function body $nl}}}
end of function body
f2 : command not found ( f2 .whence_function fw )
$fw {.mapped_argfunction {
.function $name .{argfunction} {.argfunction}}}
.function f1 name .{argfunction} {.mapped_argfunction {
.function $name .{argfunction} {.argfunction}}}
.function f2 .{argfunction} {.mapped_argfunction {
.function $name .{argfunction} {
.function $name .{argfunction} {.mapped_argfunction {
.function $name .{argfunction} {.argfunction}}}}}}
$.nop $A $FIGNORE
$.exit 0
now terminating normally