No, they can take up the whole screen. Here is a shell script one. Try it and let me know if I misunderstood.
Making FreeBSD jails with jail.conf - General Discussion - TrueNAS Community Forums
Here is a small one (I’d like to see how this one expands).
; SCHEME
(define tolerance 0.00001)
(define (fixed-point f first-guess)
(define (close-enough? v1 v2)
(< (abs (- v1 v2)) tolerance))
(define (try guess)
(let ((next (f guess)))
(if (close-enough? guess next)
next
(try next))))
(try first-guess))
EDIT: They only expand vertically as far as it can. So if the code block is longer than the screeen it will expand up to 100pct vertically.