OILS / doc / osh.1 View on Github | oilshell.org

80 lines, 80 significant
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
25The
26.Nm
27utility is a
28.Xr bash 1 Ns -compatible
29command language interpreter:
30it reads commands either from standard input, a
31.Ar script
32file or command-line arguments and executes them.
33.Pp
34.Nm
35accepts POSIX
36.Xr sh 1
37arguments, with the following differences:
38.Bl -tag -width Ds
39.It Fl n
40Only validate the syntax.
41Also prints the AST.
42.It Fl -ast-format
43What 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
51The interactive shell only sources
52.Pa ~/.config/oils/oshrc
53on startup.
54.Sh EXIT STATUS
55The
56.Nm
57utility exits with one of the following values:
58.Bl -tag -width 3n
59.It 1
60One or more runtime errors occurred.
61.It 2
62One or more parsing errors occurred,
63either due to incorrect script syntax or improper invocation of a shell
64builtin.
65.It 126
66Permission was denied when running a command.
67.It 127
68The 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
77The
78.Nm
79utility was written by
80.An Andy Chu Aq Mt andy@oilshell.org