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
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>
- Upload wp-shkshell.zip to your WordPress plugins directory, usually
wp-content/plugins/and unzip the file. It will create a
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Create a post/page that contains a code snippet following the proper usage syntax.
There are no reviews for this plugin.
Contributors and Developers
“WP-ShkShell” is open source software. The following people have contributed to this plugin.Contributors
- Added support for comments (^#)
- Extended variables names: [A-Z_]+ to [a-zA-Z0-9_]+
- Path fix (thx to James House). Was causing bad parsing without space before ‘;’
- Added sub-shell commands recognition
So that in
cmdwill be highlighted as a command
- Fixed 0.4.1 (backquotes)
- Fixed 0.4.2.5 (commands detection)
- Improved commands detection
- Removed conditions
- Improved CSS and README
- Added support for backquotes
- Fixed path to CSS (was hard-coded and case-insensitive)
- Added support for special variables $* $@ etc.
- Added support for conditions 
- Fixed strings
- Added support for strings ” and “”
- Added support for variables $… and $(…)
- Added support for fullpath commands
- Added support for commands with –
- Added support for ; and commands with –
- Fixed && and ||
- Perfect multi-line support
- Tag pre lang=”shell”, with prompt
- Added multiline commands, pre class=””
- First release, pre id=””