[[PageOutline(2-5,Contents,pullout)]] = Shell Example == Description Wiki Formatter for command line shell examples. This plugin has only been tested on Trac 0.12, but may work with earlier versions. == Example Additional examples are available [http://svn.umtri.umich.edu/trac/bio/wiki/useful/ShellExample/readme here]. {{{ {{{ #!ShellExample (full example showing how to use openssl to connect to a pops mail server) $ openssl s_client -connect mail.foo.com:995 CONNECTED(00000003) depth=0 /C=US/ST=Nowhere/O=Foo/OU=bar/CN=mail.foo.com $$--- --- +OK Dovecot ready. <1c32.1a611.4c4859c2.BEuUvAEtnt0du+msvFig0w==@mail.foo.com> $$ user {username} +OK $$ pass {password} +OK Logged in. $$ stat +OK 509 15659197 $$ quit +OK Logging out. closed }}} }}} Produces output like this: [[BR]] [[Image(ShellExample-example.png)]] == More Details This is a [wiki:WikiProcessors WikiProcessor] so it is used with the standard #! notation. This processor injects css code into Trac, so you should get formatted output by default. Any tagged code is inside a span element, and the following classes are used: * se-input * se-input-userreplacement * se-input-string * se-input-continuation * se-input-option * se-input-delayed * se-prompt * se-prompt-start * se-prompt-user * se-prompt-userhostseparator * se-prompt-host * se-prompt-path * se-prompt-end * se-root * se-unprivileged * se-note * se-output * se-output-snipped {{{ {{{ #!ShellExample {user@foo ~/path/to}$ foo --user {username} }}} }}} results in something like the following (expanded for easier reading): {{{ #!xml
{ user @ foo ~/path/to } $ foo --user {username}