| 1 | .\" Copyright © 2016 Andy Chu. All rights reserved.
 | 
| 2 | .\"
 | 
| 3 | .\" Licensed under the Apache License, Version 2.0 (the "License");
 | 
| 4 | .\" You may not use this file except in compliance with the License.
 | 
| 5 | .\"
 | 
| 6 | .\" You may obtain a copy of the License at:
 | 
| 7 | .\" http://www.apache.org/licenses/LICENSE-2.0
 | 
| 8 | .Dd June 28, 2019
 | 
| 9 | .Dt OSH 1
 | 
| 10 | .Os
 | 
| 11 | .Sh NAME
 | 
| 12 | .Nm osh
 | 
| 13 | .Nd command language interpreter
 | 
| 14 | .Sh SYNOPSIS
 | 
| 15 | .Nm
 | 
| 16 | .Op Ar options
 | 
| 17 | .Ar script
 | 
| 18 | .Op Ar args
 | 
| 19 | .Nm
 | 
| 20 | .Op Ar options
 | 
| 21 | .Fl c
 | 
| 22 | .Op command_string
 | 
| 23 | .Op args
 | 
| 24 | .Sh DESCRIPTION
 | 
| 25 | The
 | 
| 26 | .Nm
 | 
| 27 | utility is a
 | 
| 28 | .Xr bash 1 Ns -compatible
 | 
| 29 | command language interpreter:
 | 
| 30 | it reads commands either from standard input, a
 | 
| 31 | .Ar script
 | 
| 32 | file or command-line arguments and executes them.
 | 
| 33 | .Pp
 | 
| 34 | .Nm
 | 
| 35 | accepts POSIX
 | 
| 36 | .Xr sh 1
 | 
| 37 | arguments, with the following differences:
 | 
| 38 | .Bl -tag -width Ds
 | 
| 39 | .It Fl n
 | 
| 40 | Only validate the syntax.
 | 
| 41 | Also prints the AST.
 | 
| 42 | .It Fl -ast-format
 | 
| 43 | What format the AST should be in.
 | 
| 44 | .El
 | 
| 45 | .Sh ENVIRONMENT
 | 
| 46 | .Bl -tag -width "OILS_CRASH_DUMP_DIR"
 | 
| 47 | .It Ev OILS_HIJACK_SHEBANG
 | 
| 48 | .It Ev OILS_CRASH_DUMP_DIR
 | 
| 49 | .El
 | 
| 50 | .Sh FILES
 | 
| 51 | The interactive shell only sources
 | 
| 52 | .Pa ~/.config/oils/oshrc
 | 
| 53 | on startup.
 | 
| 54 | .Sh EXIT STATUS
 | 
| 55 | The
 | 
| 56 | .Nm
 | 
| 57 | utility exits with one of the following values:
 | 
| 58 | .Bl -tag -width 3n
 | 
| 59 | .It 1
 | 
| 60 | One or more runtime errors occurred.
 | 
| 61 | .It 2
 | 
| 62 | One or more parsing errors occurred,
 | 
| 63 | either due to incorrect script syntax or improper invocation of a shell
 | 
| 64 | builtin.
 | 
| 65 | .It 126
 | 
| 66 | Permission was denied when running a command.
 | 
| 67 | .It 127
 | 
| 68 | The referenced command or script could not be found.
 | 
| 69 | .El
 | 
| 70 | .Sh SEE ALSO
 | 
| 71 | .Xr bash 1 ,
 | 
| 72 | .Xr busybox 1 ,
 | 
| 73 | .Xr sh 1
 | 
| 74 | .Pp
 | 
| 75 | .Lk http://www.oilshell.org/release/0.22.0/doc/ Docs
 | 
| 76 | .Sh AUTHORS
 | 
| 77 | The
 | 
| 78 | .Nm
 | 
| 79 | utility was written by
 | 
| 80 | .An Andy Chu Aq Mt andy@oilshell.org
 |