aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--_includes/shell.html4
-rw-r--r--_posts/2022-03-21-shell.md5
2 files changed, 8 insertions, 1 deletions
diff --git a/_includes/shell.html b/_includes/shell.html
index 40ed1c8..9b7ed4d 100644
--- a/_includes/shell.html
+++ b/_includes/shell.html
@@ -18,5 +18,7 @@
<div>
<pre class="shell-mark">$</pre><pre class="shell-cmd">{{ cmd }}</pre>
</div>
-<pre class="shell-out">{{ include.out }}</pre>
+{% if include.out %}
+ <pre class="shell-out">{{ include.out }}</pre>
+{% endif %}
</div>
diff --git a/_posts/2022-03-21-shell.md b/_posts/2022-03-21-shell.md
index 1f8f56a..02b977d 100644
--- a/_posts/2022-03-21-shell.md
+++ b/_posts/2022-03-21-shell.md
@@ -50,3 +50,8 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
{% include 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' %}