內容簡介
WP-Terminal 會在終端機命令上產生一個類似終端機的方框。
這段程式碼是 WP-Syntax 的修改版,是一個針對 WordPress 的原始碼高亮外掛 (https://wordpress.org/extend/plugins/wp-syntax/screenshots/)。
基本使用方法
使用 <pre id="terminal" user="username" computer="computername"> 和 </pre> 包含終端機區塊,而 user 和 computer 是可選的(如果不提供 "user" 和 "computer",則會顯示它們)。更多範例說明
使用方法
使用 <pre id="terminal" user="username" computer="computername"> 和 </pre> 包含終端機區塊,而 user 和 computer 是可選的(如果不提供 "user" 和 "computer",則會顯示它們)。
範例1: 未自訂指令
<pre id="terminal">
ls -a
</pre>
範例2: 自訂使用者和電腦名稱
<pre id="terminal" user="mariano" computer="eugene">
ls -a
</pre>
範例3: 只自訂使用者
<pre id="terminal" user="mariano">
ls -a
</pre>
範例4: 只自訂電腦名稱
<pre id="terminal" computer="eugene">
ls -a
</pre>
範例5: 多行指令
<pre id="terminal">
ls
. ..
<br/>
ls -a
. .. .hiden_file
</pre><h3>TODO</h3>1. 允許指定工作目錄
2. 允許自訂提示訊息
外掛標籤
開發者團隊
原文外掛簡介
WP-Terminal generates a terminal-like box around your terminal commands.
The code is a modification of WP-Syntax, a source code highlighter plugin for WordPress (https://wordpress.org/extend/plugins/wp-syntax/screenshots/).
Basic Usage
Wrap terminal blocks with
and
, being user and computer optional (“user” and “computer” will be shown if you don’t provide them). More usage
examples
Usage
Wrap terminal blocks with
and
, being user and computer optional (“user” and “computer” will be shown if you don’t provide them).
Example 1: No customized command
ls -a
Example 2: User and computer customizations
ls -a
Example 3: Customizing just the user
ls -a
Example 4: Customizing just the computer
ls -a
Example 5: Multiline commands
ls . ..
ls -a . .. .hiden_file
TODO
1. Allow to specify working dir
2. Allow to customize prompt
