Merge pull request #849 from lockywolf/shell.scm-scribble-fixes

Fix scribble documentation for shell.scm
This commit is contained in:
Alex Shinn 2022-08-04 20:45:39 +09:00 committed by GitHub
commit eac4adc272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,15 +8,17 @@
;;> of the subprocess may be configured before the command is executed, ;;> of the subprocess may be configured before the command is executed,
;;> including: ;;> including:
;;> ;;>
;;> * fileno configuration ;;> \itemlist[
;;> * environment variables ;;> \item{fileno configuration }
;;> * signal masks ;;> \item{environment variables }
;;> * running user ;;> \item{signal masks }
;;> * process groups ;;> \item{running user }
;;> * resource limits (CPU, memory, disk I/O, network) ;;> \item{process groups }
;;> * prioritization ;;> \item{resource limits (CPU, memory, disk I/O, network) }
;;> * namespace isolation ;;> \item{prioritization }
;;> * virtual filesystems ;;> \item{namespace isolation }
;;> \item{virtual filesystems }
;;> ]
;;> ;;>
;;> Some of these can be specified by posix_spawn(3), but the more ;;> Some of these can be specified by posix_spawn(3), but the more
;;> general features come from cgroups. ;;> general features come from cgroups.
@ -142,20 +144,24 @@
;;> ;;>
;;> for the following operators: ;;> for the following operators:
;;> ;;>
;;> \scheme{(< input)}: redirect stdin from the file input ;;> \itemlist[
;;> \scheme{(<< obj)}: redirect stdin from the displayed output of obj ;;> \item{ \scheme{(< input)}: redirect stdin from the file input }
;;> \scheme{(> output)}: redirect stdout to the file output ;;> \item{ \scheme{(<< obj)}: redirect stdin from the displayed output of obj }
;;> \scheme{(>> output)}: append stdout to the file output ;;> \item{ \scheme{(> output)}: redirect stdout to the file output }
;;> \scheme{(err> output)}: redirect stderr to the file output ;;> \item{ \scheme{(>> output)}: append stdout to the file output }
;;> \scheme{(err>> output)}: append stderr to the file output ;;> \item{ \scheme{(err> output)}: redirect stderr to the file output }
;;> \item{ \scheme{(err>> output)}: append stderr to the file output }
;;> ]
;;> ;;>
;;> Commands can also be combined logically with several operators: ;;> Commands can also be combined logically with several operators:
;;> ;;>
;;> \scheme{(do cmd1 cmd2 ...)}: run the commands in sequence ;;> \itemlist[
;;> \scheme{(and cmd1 cmd2 ...)}: run the commands in sequence until the first fails ;;> \item{ \scheme{(do cmd1 cmd2 ...)}: run the commands in sequence }
;;> \scheme{(or cmd1 cmd2 ...)}: run the commands in sequence until the first succeeds ;;> \item{ \scheme{(and cmd1 cmd2 ...)}: run the commands in sequence until the first fails }
;;> \scheme{(>< cmd1 cmd2 ...)}: pipe the output of each command to the input of the next ;;> \item{ \scheme{(or cmd1 cmd2 ...)}: run the commands in sequence until the first succeeds }
;;> \scheme{(if test pass fail)}: if test succeeds run pass, else fail ;;> \item{ \scheme{(>< cmd1 cmd2 ...)}: pipe the output of each command to the input of the next }
;;> \item{ \scheme{(if test pass fail)}: if test succeeds run pass, else fail }
;;> ]
;;> ;;>
;;> Note although piping is implicit in the \scheme{shell} syntax ;;> Note although piping is implicit in the \scheme{shell} syntax
;;> itself, the \scheme{><} operator can be useful for nested ;;> itself, the \scheme{><} operator can be useful for nested