-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpsh-builtins.man
214 lines (187 loc) · 2.98 KB
/
mpsh-builtins.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
.\" Manpage for mpsh builtins.
.TH MPSHBUILTINS 1 "General Command Manual"
.SH NAME
mpshbuiltins \- description of all mpsh's builtins
.SH DESCRIPTION
mpsh is the best shell (at the very least for those I know) ever created. He provides a list of builtin \- commands executed directly in the shell \- to improve the user experience. All builtins are described below.
.SH BUILTINS
.BI cd
[
.I
target
]
.RS
The
.I cd
utility shall change the working directory of the current shell execution environment
.RE
.BI echo
[
.I args...
]
.RS
Displays the parameters to stdout.
.RE
.BI alias
[
.I var[=name]...
]
.RS
.B -
If no arguments are given prints all aliases
.RE
.RS
.B -
If only
.I var
is given, prints the associated alias
.RE
.RS
.B -
If an argument of type
.I var=name
is given, associates
.I var
to alias
.I name
.RE
.B exit
[
.I n
]
.RS
.B -
If
.I n
is given, exists with n return code
.RE
.RS
.B -
If
.I $?
is a valid unsigned char, exists with $? return code
.B -
Else exits with 0.
.RE
.B export
[
.I var[=name]...
]
.RS
The shell shall give the export attribute to the variables corresponding to the specified names, which shall cause them to be in the environment of subsequently executed commands. If the name of a variable is followed by
.IR =word
, then the value of that variable shall be set to word.
.RE
.B unalias
[
.I name
]
.RS
Removes the alias for the given
.I name
.RE
.B type
.I name
[
.I name...
]
.RS
Indicates how each argument would be interpreted by the shell
.RE
.B umask
[
.I n
]
.RS
Changes the umask value.
.I n
must be a number written in octal
.RE
.B history
[
.I n
]
.RS
.B -
If no argument is specified, print all commands stored in the history
.RE
.RS
.B -
If
.I n
is a positif integer, executes the
.I n-ith
command of the history
.RE
.RS
.B -
If
.I n
is a negative integer only remembers the last
.I -n-th
commands
.RE
.B which
.I name
[
.I name...
]
.RS
Prints the full path of executable or how they would have been interpreted by the shell otherwise.
.B mpsh
use the environnement variable
.B CHEMIN
instead of
.BR PATH.
This is the reason
.B which
is a builtin
.RE
.B complete
[
.I name|name ext...
]
.RS
.B -
If no argument is given, print all defined completions
.RE
.RS
.B -
If only a
.I name
is given, removes all completion associated with the given
.I name
.RE
.RS
.B -
If a
.I name
is given and a list of extentions
.IR ext,
adds extensions to the list of extensions for the given name. If a such list is
.BR unempty,
the completion will suggests only files of specified extentions for the given
.I name
.RE
.B source
.I script
.RS
Executes the script without fork-ing, allowing it to create and keep vars / alias / completions into mpsh for further uses.
.RE
.B fg
[
.I job_id
]
.RS
If a job is running in background, call
.I fg
places it on the foreground. If no argument is given, the last jobs created is place on foreground, otherwise the job for the corresponding id
.RE
.B jobs
.RS
List all jobs running in background
.RE
.RS
.RE
.SH AUTHORS
Maxime FLIN and Pierre Gimalac