Title: WP-ShkShell
Author: ShkSchneider
Published: <strong>2012 年 2 月 27 日</strong>
Last modified: 2012 年 3 月 18 日

---

搜索插件

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

![](https://s.w.org/plugins/geopattern-icon/wp-shkshell.svg)

# WP-ShkShell

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

[下载](https://downloads.wordpress.org/plugin/wp-shkshell.zip)

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

 [支持](https://wordpress.org/support/plugin/wp-shkshell/)

## 描述

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/).

### Usage

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

## 安装

 1. Upload wp-shkshell.zip to your WordPress plugins directory, usually `wp-content/
    plugins/` and unzip the file. It will create a `wp-content/plugins/wp-shkshell/`
    directory.
 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.

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ ShkSchneider ](https://profiles.wordpress.org/shkschneider/)
 *   [ msimone ](https://profiles.wordpress.org/msimone/)

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

### 对开发感兴趣吗?

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

## 更新日志

#### 0.6.0

 * Added support for comments (^#)

#### 0.5.3

 * Extended variables names: [A-Z_]+ to [a-zA-Z0-9_]+

#### 0.5.2

 * Path fix (thx to James House). Was causing bad parsing without space before ‘;’

#### 0.5.1

 * Added sub-shell commands recognition
    So that in `VAR=$(cmd ...)`, `cmd` will
   be highlighted as a command

#### 0.5

 * Fixed 0.4.1 (backquotes)

#### 0.4.3

 * Fixed 0.4.2.5 (commands detection)

#### 0.4.2.5

 * Improved commands detection

#### 0.4.2

 * Removed conditions
 * Improved CSS and README

#### 0.4.1

 * Added support for backquotes

#### 0.4.0

 * Fixed path to CSS (was hard-coded and case-insensitive)

#### 0.3.8.5

 * Added support for special variables $* $@ etc.

#### 0.3.8

 * Added support for conditions []

#### 0.3.7.5

 * Fixed strings

#### 0.3.7

 * Added support for strings ” and “”

#### 0.3.6

 * Added support for variables $… and $(…)

#### 0.3.5

 * Added support for fullpath commands

#### 0.3.4

 * Added support for commands with –

#### 0.3.3

 * Added support for ; and commands with –

#### 0.3.2

 * Fixed && and ||

#### 0.3.1

 * Perfect multi-line support

#### 0.3

 * Tag pre lang=”shell”, with prompt

#### 0.2

 * Added multiline commands, pre class=””

#### 0.1

 * First release, pre id=””

## 额外信息

 *  版本 **0.6.0**
 *  最后更新：**14 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 2.0 或更高版本 **
 *  已测试的最高版本为 **3.3.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-shkshell/)
 * 标签
 * [command](https://cn.wordpress.org/plugins/tags/command/)[console](https://cn.wordpress.org/plugins/tags/console/)
   [shell](https://cn.wordpress.org/plugins/tags/shell/)[terminal](https://cn.wordpress.org/plugins/tags/terminal/)
   [unix](https://cn.wordpress.org/plugins/tags/unix/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-shkshell/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/wp-shkshell/reviews/#new-post)

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

## 贡献者

 *   [ ShkSchneider ](https://profiles.wordpress.org/shkschneider/)
 *   [ msimone ](https://profiles.wordpress.org/msimone/)

## 支持

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

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

## 捐助

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

 [ 捐助此插件 ](http://www.shkschneider.me)