
WP-ShkShell provides a terminal-like box for embedding terminal commands within pages or posts.
It also support multi-lines, multi-commands and has syntax hightlight.
The code is a modification of WP-Terminal (https://wordpress.org/extend/plugins/wp-terminal/).
Wrap terminal blocks with <pre lang="shell" prompt="$"> and </pre>.
Example 1: Default prompt
<pre lang="shell" prompt="$">
ls -a
</pre>
Example 2: Customized prompt
<pre lang="shell" prompt="#">
ls -a
</pre>
Example 3: Another customized prompt
<pre lang="shell" prompt="user@machine$">
ls -a
</pre>
Example 4: Comments
<pre lang="shell" prompt="user@machine$">
ls -a
# will also list hidden files
</pre>
Example 5: Multiline commands
<pre lang="shell">
ls
<br>ls -a
</pre>
Example 6: Multiline lines, multiple commands
<pre lang="shell">
ls
file1 file2 file3
<br>ls -A
.file0 file1 file2 file3
</pre>
Download & install the zip archive
The plugin package installer can be downloaded from the WP2E project tab called “code”.
1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.
2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.
3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.
Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.