Popis
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.
Kód je fork Post Terminalu, což je fork WP-Terminalu, který zase je modifikácí WP-Syntaxu, zvýrazňovač zdrojového kódu pro WordPress.
Unlike Post terminal, it uses [terminal]
shorthand for the terminal box. It also shows prompt only on lines explitly set to do that.
Jednoduché použití
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.
Použití
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.
Příklad 1: Žádný vlastní příkaz
[terminal]
$ ls -a
[/terminal]
Příklad 2: Úprava uživatelských a nastavení počítače
[terminal user="tux" computer="linux"]
$ ls -a
[/terminal]
Příklad 3: Úprava pouze uživatele
[terminal user="dak"]
$ ls -a
[/terminal]
Příklad 4: Úprava uživatele, počítaře a zobrazování pracovní složky
[terminal user="root" computer="linuxserver" cwd="/usr/src/linux"]
$ make mrproper
...
...
[/terminal]
Snímky obrazovky
Instalace
- Rozbalte .zip soubor doplňku a nahrajte ho do /wp-content/plugins/
- Aktivujte plugin přes menu „Pluginy“ ve WordPressu.
- Vytvořit příspěvěk/stránku, která obsahuje úryvek kódu sledující správnou syntaxi.
Nejčastější dotazy
-
Co je nejlepší způsob jak se zeptat na otázky nebo poslat opravy?
-
Nejlepší způsob jak mne kontaktovat je e-mail: mail@radeksprta.eu
Recenze
Pro tento plugin nejsou žádné recenze.
Autoři
Blog Terminal je otevřený software. Následující lidé přispěli k vývoji tohoto pluginu.
SpolupracovníciPřeložte “Blog Terminal” do svého jazyka.
Zajímá vás vývoj?
Prohledejte kód, podívejte se do SVN repozitáře, nebo se přihlaste k odběru protokolu vývoje pomocí RSS.
Přehled změn
0.2.1
- Přidat chybějící druh souboru
0.2.0
- Udělejte kompatibilním s 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
- První vydání