aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_posts/2022-03-21-shell.md
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-03-23 16:52:53 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2022-03-23 16:56:55 +0300
commitc8bbc25228a7d199ca6868db7375f1661c3ef6e4 (patch)
treeb6b3c84795e441c05cc2d2a7fbbbfc34a492b377 /_posts/2022-03-21-shell.md
parentindex.html: reuse page.title (diff)
downloadjekyll-theme-c8bbc25228a7d199ca6868db7375f1661c3ef6e4.tar.gz
jekyll-theme-c8bbc25228a7d199ca6868db7375f1661c3ef6e4.zip
_includes: move everything to jekyll-theme/
Diffstat (limited to '_posts/2022-03-21-shell.md')
-rw-r--r--_posts/2022-03-21-shell.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/_posts/2022-03-21-shell.md b/_posts/2022-03-21-shell.md
index 8a330ff..340d0b5 100644
--- a/_posts/2022-03-21-shell.md
+++ b/_posts/2022-03-21-shell.md
@@ -7,11 +7,11 @@ category: Work
It's easy to style shell commands and their outputs.
Here's a one-line command and a one-line output.
-{% include shell.html cmd='echo 1' out='1' %}
+{% include jekyll-theme/shell.html cmd='echo 1' out='1' %}
You can pass multiple commands and multi-line output to the include as well:
-{% include shell.html cmd='echo 1
+{% include jekyll-theme/shell.html cmd='echo 1
echo 2' out='1
2' %}
@@ -30,12 +30,12 @@ touch test.txt && \
456
{% endcapture %}
-{% include shell.html cmd=cmd1 out=out1 %}
+{% include jekyll-theme/shell.html cmd=cmd1 out=out1 %}
You can display multiple commands one after another.
-{% include shell.html cmd="printf 'Hello\n'" out='Hello' %}
-{% include shell.html cmd="printf 'World\n'" out='World' %}
+{% include jekyll-theme/shell.html cmd="printf 'Hello\n'" out='Hello' %}
+{% include jekyll-theme/shell.html cmd="printf 'World\n'" out='World' %}
Only the last one will have a bottom margin.
@@ -48,11 +48,11 @@ printf '%s\n' 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
{% endcapture %}
-{% include shell.html cmd=cmd1 out=out1 %}
+{% include jekyll-theme/shell.html cmd=cmd1 out=out1 %}
This is ugly though, so please don't do that.
Commands don't necessarily have to have output:
-{% include shell.html cmd='mkdir test' %}
-{% include shell.html cmd='cd test' %}
+{% include jekyll-theme/shell.html cmd='mkdir test' %}
+{% include jekyll-theme/shell.html cmd='cd test' %}