Markdown Overview Buttons Tabs Footnotes Collapse ToC Navigation Formula Page-Specific Meta Custom Components
Terminal snippets are like typical code snippets with two main differences:
1link```bash
2linkecho Hellow World! # --> this is typical code, shown with a prefix
3link> Hellow World!    # --> this is the output segment
4link```
1link$echo Hellow World!
 Hellow World!By default, all bash code snippets are considered terminal snippets. You can enforce that on other
languages using --term flag:
1link```js | --term
2linkconsole.log('Hellow World!');
3link> Hellow World!
4link```
1link$console.log('Hellow World!');
 Hellow World!Additionally, you can add
--no-termflag tobashcode snippets so that they are displayed like regular code snippets.
You can specify the terminal prefix by passing it to --term flag:
1link```bash | --term eugenes-laptop codedoc>
2linkpwd
3link> /Users/eugene/projects/codedoc
4link
5linkcd ..
6linkpwd
7link> /Users/eugene/projects
8link```
1linkeugenes-laptop codedoc>pwd
 /Users/eugene/projects/codedoc2linkeugenes-laptop codedoc>
3linkeugenes-laptop codedoc>cd ..
4linkeugenes-laptop codedoc>pwd
 /Users/eugene/projectsYou can style the outputs using chalk's template literal syntax:
1link```bash
2linkcodedoc s
3link> {greenBright #} Serving ...
4link> {greenBright #} Fetching project configuration ...
5link> ts-node-dev ver. 1.0.0-pre.63 (using ts-node ver. 8.10.2, typescript ver. 3.9.7)
6link>
7link> {greenBright #} Serving docs on {cyan http://localhost:3000}
8link> {gray # building ........ docs/md/404.md}
9link> {green # built:: ......... dist/404.html}
10link> ...
1link$codedoc s
 # Serving ...
 # Fetching project configuration ...
 ts-node-dev ver. 1.0.0-pre.63 (using ts-node ver. 8.10.2, typescript ver. 3.9.7)
 # Serving docs on http://localhost:3000
 # building ........ docs/md/404.md
 # built:: ......... dist/404.html
 ...