Title: Blog Terminal
Author: rsprta
Published: <strong>2017 年 10 月 17 日</strong>
Last modified: 2021 年 8 月 11 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/blog-terminal/assets/icon-256x256.png?rev=1747880)

# Blog Terminal

 作者：[rsprta](https://profiles.wordpress.org/rsprta/)

[下载](https://downloads.wordpress.org/plugin/blog-terminal.0.2.1.zip)

 * [详情](https://cn.wordpress.org/plugins/blog-terminal/#description)
 * [评价](https://cn.wordpress.org/plugins/blog-terminal/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/blog-terminal/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/blog-terminal/#developers)

 [支持](https://wordpress.org/support/plugin/blog-terminal/)

## 描述

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]
    ```

## 屏幕截图

[⌊Basic display with no configuration.⌉⌊Basic display with no configuration.⌉[

Basic display with no configuration.

[⌊Basic display with user and computer configuration.⌉⌊Basic display with user and
computer configuration.⌉[

Basic display with `user` and `computer` configuration.

[⌊Basic display with user and computer and cwdconfiguration.⌉⌊Basic display with
user and computer and cwdconfiguration.⌉[

Basic display with `user` and `computer` and `cwd`configuration.

[⌊A more thorough example showing demonstrative purposes⌉⌊A more thorough example
showing demonstrative purposes⌉[

A more thorough example showing demonstrative purposes

## 安装

 1. Unzip the plugin .zip file and upload the directory to your /wp-content/plugins/.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Create a post/page that contains a code snippet following the proper usage syntax.

## 常见问题

### What is the best way to ask questions or submit patches?

The best way to reach me is always via email: [mail@radeksprta.eu](https://cn.wordpress.org/plugins/blog-terminal/mail@radeksprta.eu?output_format=md)

## 评价

此插件暂无评价。

## 贡献者及开发者

「Blog Terminal」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ rsprta ](https://profiles.wordpress.org/rsprta/)

[帮助将「Blog Terminal」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/blog-terminal)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/blog-terminal/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/blog-terminal/)，或通过[RSS](https://plugins.trac.wordpress.org/log/blog-terminal/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/blog-terminal/)。

## 更新日志

#### 0.2.1

 * Add missing style file

#### 0.2.0

 * Make compatible with PHP 7

#### 0.1.2

 * Preserve terminal indentation

#### 0.1.1

 * Wrap long lines
 * Wrap terminal in code tags
 * Adhere to the latest WordPress coding standards

#### 0.1.0

 * Initial release

## 额外信息

 *  版本 **0.2.1**
 *  最后更新：**5 年前**
 *  活跃安装数量 **90+**
 *  WordPress 版本 ** 2.5 或更高版本 **
 *  已测试的最高版本为 **5.8.19**
 *  PHP 版本 ** 5.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/blog-terminal/)
 * 标签
 * [cmd](https://cn.wordpress.org/plugins/tags/cmd/)[console](https://cn.wordpress.org/plugins/tags/console/)
   [terminal](https://cn.wordpress.org/plugins/tags/terminal/)[unix](https://cn.wordpress.org/plugins/tags/unix/)
   [xterm](https://cn.wordpress.org/plugins/tags/xterm/)
 *  [高级视图](https://cn.wordpress.org/plugins/blog-terminal/advanced/)

## 评级

尚未提交反馈。

[您的评价](https://wordpress.org/support/plugin/blog-terminal/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/blog-terminal/reviews/)

## 贡献者

 *   [ rsprta ](https://profiles.wordpress.org/rsprta/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/blog-terminal/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://radeksprta.eu)