wiki:ShellExample

Version 6 (modified by moo, 8 years ago) (diff)

--

Shell Example

We wrote an ShellExample preprocessor macro for trac. It's mainly for giving guide on what/how to do under shell prompt. The main purpose of ShellExample is to separate "user input" from "output", other than having all the beautiful decorations.

{{{
#!ShellExample
$ ./configure --help
...
  --enable-abc ......
  --enable-def ......
  --with-ghi[=dir] ......
...
$ ./configure '--enable-abc' \
 '--enable-def' \
 --with-ghi='/usr
/local'
(many outputs here)

$ make
(many outputs again)

(now su to root)
$ su
Password:
(type your root password)

# make install
(ok, it's now installed)
}}}

read as

$ ./configure '--enable-abc' \
 '--enable-def' \
 --with-ghi='/usr/local
def'
(many outputs here)

$ make
(many outputs again)

(now su to root)
$ su
Password:
(type your root password)

# make install
(ok, it's now installed)

Simply preview/download it to /usr/share/trac/wiki-macros

Other supported patterns

root@host # ...
user@host $ ...
C:\>
C:\Documents and Settings\username\>

Attachments (1)

Download all attachments as: .zip