Star

MIT License
Copyright © 2020
CONNECT-platform

linkTerminal Snippets

Terminal snippets are like typical code snippets with two main differences:

1link```bash

2link<span class="token builtin class-name">echo</span> Hellow World<span class="token operator">!</span> <span class="token comment"># --> this is typical code, shown with a prefix</span>

3link<span class="token operator">></span> Hellow World<span class="token operator">!</span> <span class="token comment"># --> this is the output segment</span>

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<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'Hellow World!'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

3link<span class="token operator">></span> Hellow World<span class="token operator">!</span>

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>

2link<span class="token builtin class-name">pwd</span>

3link<span class="token operator">></span> /Users/eugene/projects/codedoc

4link

5link<span class="token builtin class-name">cd</span> <span class="token punctuation">..</span>

6link<span class="token builtin class-name">pwd</span>

7link<span class="token operator">></span> /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