RUNBLOCK(1)
RUNBLOCK(1) π β from the General Commands Manual β execute an execline block
πΈ NAME πΈ
runblock β execute an execline block. Thatβs the vibe, bestie. π
β¨ SYNOPSIS β¨
runblock [-P] [-n argshift] [-r] n cmd...
π DESCRIPTION π
okay so runblock exists to help you write execline commands in the execline language. It can only be used inside an execline script β no cap. If the script has been given blocks as arguments, runblock lets you execute one of those blocks individually. It also lets you give those blocks as a set of arguments to another command. Slay. β¨
First, runblock skips the first argshift positional parameters. Why? So you can design commands that take simple arguments and blocks. Then runblock looks for and parses blocks (cf. execline-block(7)) in the positional parameters. π¦
Hereβs the flag tea, bestie:
-n argshiftβ this is theargshiftsituation: the firstargshiftpositional parameters get skipped.-rβ if this option is present,runblockskipsnblocks and execs into the remaining arguments.-Pβ normallyrunblockpops (cf.execline-pushenv(7)) its environment frame before executing. If-Phas been given, it does not pop.nβ without-r,runblockskipsnβ1blocks and execs into thenth one.cmd...β ifcmd...is not empty, then instead of directly executing the block or the remainder,runblockappends the selected set of arguments to thecmd...command line.
π Of course, if the block structure doesnβt match,runblockexits100with an error message. Not the vibe, but important.
π Credits π
The runblock idea, as well as the ifelse(1) idea, comes from Paul Jarc[1]. iconic behavior. π
π EXAMPLES π
Suppose we want to implement the ifelse(1) command as an execline script, using the ifte(1) command. runblock lets us do it in a simple way:
#!/command/execlineb
ifte { runblock 2 } { runblock -r 2 } runblock 1
Thatβs it. Literally. π
π¦ SEE ALSO π¦
This man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/runblock.html
π AUTHORS π
- Laurent Bercot
Alexis <flexibeast@gmail.com>(man page port)
π¦ Debian edition, dated February 14, 2021 β RUNBLOCK(1), signing off. stay slay, bestie. π
π¦ where this page comes from
- nixpkgs unstable: execline 2.9.9.2
- nixpkgs unstable: execline-man-pages 2.9.9.1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms