[wordpress插件] Blog Terminal博客终端

wordpress 插件 文章 2020-03-07 06:50 610 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

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.

Blog Terminal会生成一个类似于终端的框,您可以用它来演示终端输出或显示Terminal / Console命令的输入,这种方式更能说明实际使用Linux / Unix终端或Windows cmd Shell的情况。

p>

>

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.

代码是Post Terminal的分支,而Post Terminal是WP-Terminal的分支,而WP-Terminal则是WP-Syntax的修改版,WP-Syntax是WordPress的源代码荧光笔插件。

Unlike Post terminal, it uses [terminal] shorthand for the terminal box.

与Post终端不同,它使用 [terminal] 简写作为终端盒。

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.

最基本的用法是用 [terminal] [/ terminal] 标签包装接线盒。

If no further options are defined within the tag a generic prompt is generated using ‘user@computer’ with no working directory shown.

如果标记中未定义其他选项,则会使用“ user @ computer”生成通用提示,但不会显示工作目录。

This is similar to exporting PS1=”\u@\h:$ ” in sh(1), setting prompt=”%n@%m:$ ” in csh(1), etc.

这类似于在sh(1)中导出PS1 =” \ u @ \ h:$”,在csh(1)中设置提示符=“%n @%m:$”,等等。

Other options available within the tag are user=”user”, computer=”computer”, and cwd=”/path/to/directory”.

标签内可用的其他选项是user =“用户”,computer =“计算机”和cwd =“ / path / to / directory”。

These allow you to override the generic user@computer settings as well as provide a ‘current working directory’.

这些使您可以覆盖常规的user @ computer设置,并提供“当前工作目录”。

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

[终端用户=“用户名” computer =“计算机名” cwd =“ /路径/目标目录”] [\ terminal] 包裹接线盒。

They are all optional.

它们都是可选的。

“user” and “computer” will be shown if you don’t provide them, cwd is purely optional.

如果您不提供“用户”和“计算机”,则会显示出来,cwd完全是可选的。

Example 1: No customized command

示例1:无自定义命令

[terminal]

  [终端]

$ ls -a

$ ls -a

[/terminal]

[/终奌站]

Example 2: User and computer customizations

示例2:用户和计算机自定义

[terminal user="tux" computer="linux"]

  [终端用户=“ tux” computer =“ linux”]

$ ls -a

$ ls -a

[/terminal]

[/终奌站]

Example 3: Customizing just the user

示例3:仅自定义用户

[terminal user="dak"]

  [终端用户=“ dak”]

$ ls -a

$ ls -a

[/terminal]

[/终奌站]

Example 4: Customizing user, computer and displaying a working directory

示例4:自定义用户,计算机并显示工作目录

[terminal user="root" computer="linuxserver" cwd="/usr/src/linux"]

  [终端用户=“ root” computer =“ linuxserver” cwd =“ / usr / src / linux”]

$ make mrproper 

$使mrproper 

... 

... 

...

...

[/terminal]

[/终奌站]

安装步骤

    1. Unzip the plugin .zip file and upload the directory to your /wp-content/plugins/.
    2. 解压缩插件.zip文件并将目录上传到您的/ wp-content / plugins/。
    3. Activate the plugin through the ‘Plugins’ menu in WordPress.
    4. 通过WordPress中的“插件”菜单激活插件。

    5. Create a post/page that contains a code snippet following the proper usage syntax.
    6. 创建一个包含正确使用语法的代码段的帖子/页面。

下载地址
https://downloads.wordpress.org/plugin/blog-terminal.0.2.1.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Blocks CSS: CSS Editor for Gutenberg Blocks块CSS:古腾堡块的CSS编辑器
[wordpress插件] Assign Related Posts分配相关职位
[wordpress插件] Google Analytics Analyticator – Simple Google Analytics integration pluginGoogle Analytics Analyticator –简单的Google Analytics集成插件
[wordpress插件] Catch Sticky Menu抓粘菜单
[wordpress插件] Create User With Password Multisite使用密码多站点创建用户
随便看看
微信公众号免300认证教程 5892
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5299
小程序广告组件通过审核,但是小程序内没有显示广告? 5067
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9048
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7472
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 6793
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 6128
如何解决渲染层网络错误Failed to load media? 17394