Blog Terminal provides a terminal-like box for embedding terminal commands within pages or posts.
| Author: | rsprta (profile at wordpress.org) |
| WordPress version required: | 2.5 |
| WordPress version tested: | 5.8.20 |
| Plugin version: | 0.2.1 |
| Added to WordPress repository: | 17-10-2017 |
| Last updated: | 11-08-2021
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
| Rating, %: | 0 |
| Rated by: | 0 |
| Plugin URI: | https://radeksprta.eu/projects/terminal |
| Total downloads: | 4 514 |
| Active installs: | 80+ |
![]() Click to start download |
|
Blog Terminal generates a terminal-like box that you can use to demonstrate terminal output or show the entry of terminal/console commands in a manner that is more demonstrative of actually using a Linux/Unix terminal or Windows cmd shell.
The code is a fork of Post Terminal, which is a fork of WP-Terminal which in turn is a modification of WP-Syntax, a source code highlighter plugin for WordPress.
Unlike Post terminal, it uses [terminal] shorthand for the terminal box. It also shows prompt only on lines explitly set to do that.
Basic Usage
The most basic usage is to wrap your terminal blocks with [terminal][/terminal] tags. If no further options are defined within the tag a generic prompt is generated using ‘user@computer’ with no working directory shown. This is similar to exporting PS1=”\u@\h:$ ” in sh(1), setting prompt=”%n@%m:$ ” in csh(1), etc.
Other options available within the tag are user=”user”, computer=”computer”, and cwd=”/path/to/directory”. These allow you to override the generic user@computer settings as well as provide a ‘current working directory’.
The prompt is only shown on the lines starting with ‘$ ‘. So you can mix commands with simulated terminal output.
Usage
Wrap terminal blocks with [terminal user="username" computer="computername" cwd="/path/to/directory"] and [\terminal]. They are all optional. “user” and “computer” will be shown if you don’t provide them, cwd is purely optional.
Example 1: No customized command
[terminal]
$ ls -a
[/terminal]
Example 2: User and computer customizations
[terminal user="tux" computer="linux"]
$ ls -a
[/terminal]
Example 3: Customizing just the user
[terminal user="dak"]
$ ls -a
[/terminal]
Example 4: Customizing user, computer and displaying a working directory
[terminal user="root" computer="linuxserver" cwd="/usr/src/linux"]
$ make mrproper
...
...
[/terminal]
Screenshots
FAQ
ChangeLog




