Skip to content

Commit 223fbea

Browse files
committed
feat: Support color escape codes. Closes #3
1 parent 9f47181 commit 223fbea

File tree

2 files changed

+498
-31
lines changed

2 files changed

+498
-31
lines changed

docs/bash-term.md

Lines changed: 245 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,33 @@
2828
* [term.tab_set()](#termtab_set)
2929
* [term.tab_clear()](#termtab_clear)
3030
* [term.tab_clearall()](#termtab_clearall)
31+
* [term.screen_save()](#termscreen_save)
32+
* [term.screen_restore()](#termscreen_restore)
33+
* [term.style_reset()](#termstyle_reset)
34+
* [term.style_bold()](#termstyle_bold)
35+
* [term.style_dim()](#termstyle_dim)
36+
* [term.style_italic()](#termstyle_italic)
37+
* [term.style_underline()](#termstyle_underline)
38+
* [term.style_inverse()](#termstyle_inverse)
39+
* [term.style_hidden()](#termstyle_hidden)
40+
* [term.style_strikethrough()](#termstyle_strikethrough)
41+
* [term.style_hyperlink()](#termstyle_hyperlink)
42+
* [term.color_black()](#termcolor_black)
43+
* [term.color_red()](#termcolor_red)
44+
* [term.color_green()](#termcolor_green)
45+
* [term.color_orange()](#termcolor_orange)
46+
* [term.color_blue()](#termcolor_blue)
47+
* [term.color_purple()](#termcolor_purple)
48+
* [term.color_cyan()](#termcolor_cyan)
49+
* [term.color_light_gray()](#termcolor_light_gray)
50+
* [term.color_dark_gray()](#termcolor_dark_gray)
51+
* [term.color_light_red()](#termcolor_light_red)
52+
* [term.color_light_green()](#termcolor_light_green)
53+
* [term.color_yellow()](#termcolor_yellow)
54+
* [term.color_light_blue()](#termcolor_light_blue)
55+
* [term.color_light_purple()](#termcolor_light_purple)
56+
* [term.color_light_cyan()](#termcolor_light_cyan)
57+
* [term.color_white()](#termcolor_white)
3158
* [term.beep()](#termbeep)
3259
* [term.hyperlink()](#termhyperlink)
3360
* [term.bold()](#termbold)
@@ -211,6 +238,219 @@ _Function has no arguments._
211238

212239
_Function has no arguments._
213240

241+
### term.screen_save()
242+
243+
Save screen
244+
245+
_Function has no arguments._
246+
247+
### term.screen_restore()
248+
249+
Restore screen
250+
251+
_Function has no arguments._
252+
253+
### term.style_reset()
254+
255+
Construct reset
256+
257+
#### Arguments
258+
259+
* **$1** (string): text
260+
261+
### term.style_bold()
262+
263+
Construct bold
264+
265+
#### Arguments
266+
267+
* **$1** (string): text
268+
269+
### term.style_dim()
270+
271+
Construct dim
272+
273+
#### Arguments
274+
275+
* **$1** (string): text
276+
277+
### term.style_italic()
278+
279+
Construct italic
280+
281+
#### Arguments
282+
283+
* **$1** (string): text
284+
285+
### term.style_underline()
286+
287+
Construct underline
288+
289+
#### Arguments
290+
291+
* **$1** (string): text
292+
293+
### term.style_inverse()
294+
295+
Construct inverse
296+
297+
#### Arguments
298+
299+
* **$1** (string): text
300+
301+
### term.style_hidden()
302+
303+
Construct hidden
304+
305+
#### Arguments
306+
307+
* **$1** (string): text
308+
309+
### term.style_strikethrough()
310+
311+
Construct strikethrough
312+
313+
#### Arguments
314+
315+
* **$1** (string): text
316+
317+
### term.style_hyperlink()
318+
319+
Construct hyperlink
320+
321+
#### Arguments
322+
323+
* **$1** (string): text
324+
* **$2** (string): url
325+
326+
### term.color_black()
327+
328+
Construct black color
329+
330+
#### Arguments
331+
332+
* **$1** (string): text
333+
334+
### term.color_red()
335+
336+
Construct red color
337+
338+
#### Arguments
339+
340+
* **$1** (string): text
341+
342+
### term.color_green()
343+
344+
Construct green color
345+
346+
#### Arguments
347+
348+
* **$1** (string): text
349+
350+
### term.color_orange()
351+
352+
Construct orange color
353+
354+
#### Arguments
355+
356+
* **$1** (string): text
357+
358+
### term.color_blue()
359+
360+
Construct blue color
361+
362+
#### Arguments
363+
364+
* **$1** (string): text
365+
366+
### term.color_purple()
367+
368+
Construct purple color
369+
370+
#### Arguments
371+
372+
* **$1** (string): text
373+
374+
### term.color_cyan()
375+
376+
Construct cyan color
377+
378+
#### Arguments
379+
380+
* **$1** (string): text
381+
382+
### term.color_light_gray()
383+
384+
Construct light gray color
385+
386+
#### Arguments
387+
388+
* **$1** (string): text
389+
390+
### term.color_dark_gray()
391+
392+
Construct dark gray color
393+
394+
#### Arguments
395+
396+
* **$1** (string): text
397+
398+
### term.color_light_red()
399+
400+
Construct light red color
401+
402+
#### Arguments
403+
404+
* **$1** (string): text
405+
406+
### term.color_light_green()
407+
408+
Construct light green color
409+
410+
#### Arguments
411+
412+
* **$1** (string): text
413+
414+
### term.color_yellow()
415+
416+
Construct yellow color
417+
418+
#### Arguments
419+
420+
* **$1** (string): text
421+
422+
### term.color_light_blue()
423+
424+
Construct light blue color
425+
426+
#### Arguments
427+
428+
* **$1** (string): text
429+
430+
### term.color_light_purple()
431+
432+
Construct light purple color
433+
434+
#### Arguments
435+
436+
* **$1** (string): text
437+
438+
### term.color_light_cyan()
439+
440+
Construct light cyan color
441+
442+
#### Arguments
443+
444+
* **$1** (string): text
445+
446+
### term.color_white()
447+
448+
Construct white color
449+
450+
#### Arguments
451+
452+
* **$1** (string): text
453+
214454
### term.beep()
215455

216456
Construct a beep
@@ -219,7 +459,7 @@ _Function has no arguments._
219459

220460
### term.hyperlink()
221461

222-
Construct hyperlink
462+
(DEPRECATED) Construct hyperlink
223463

224464
#### Arguments
225465

@@ -228,31 +468,31 @@ Construct hyperlink
228468

229469
### term.bold()
230470

231-
Construct bold
471+
(DEPRECATED) Construct bold
232472

233473
#### Arguments
234474

235475
* **$1** (string): text
236476

237477
### term.italic()
238478

239-
Construct italic
479+
(DEPRECATED) Construct italic
240480

241481
#### Arguments
242482

243483
* **$1** (string): text
244484

245485
### term.underline()
246486

247-
Construct underline
487+
(DEPRECATED) Construct underline
248488

249489
#### Arguments
250490

251491
* **$1** (string): text
252492

253493
### term.strikethrough()
254494

255-
Construct strikethrough
495+
(DEPRECATED) Construct strikethrough
256496

257497
#### Arguments
258498

0 commit comments

Comments
 (0)