Star

MIT License
Copyright © 2020
CONNECT-platform

linkTerminal Snippets

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!

linkLanguages

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-term flag to bash code snippets so that they are displayed like regular code snippets.


linkCustom Prefix

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/codedoc
2linkeugenes-laptop codedoc>

3linkeugenes-laptop codedoc>cd ..

4linkeugenes-laptop codedoc>pwd

/Users/eugene/projects

linkColored Outputs

You 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 ...
Terminal SnippetsLanguagesCustom PrefixColored Outputs

Home Overview CLI Theme

Markdownchevron_right
Code Featureschevron_right

Images & Assets

Configurationchevron_right
Customizationchevron_right