File:  [NetBSD Developer Wiki] / wikisrc / templates / programlisting.mdwn
Revision 1.5: download - view: text, annotated - select for diffs
Wed May 12 15:50:00 2010 UTC (10 years, 9 months ago) by jym
Branches: MAIN
CVS tags: HEAD
Pray this one is the last about display issue...

    1: <pre class="programlisting"><TMPL_VAR text></pre>
    2: <TMPL_UNLESS NAME="text">
    3: 
    4: ## Description
    5: 
    6: Use this template to display a program listing, or a succession of commands (together with their output).
    7: 
    8: Remember that shell commands may be prefixed by:
    9:  * *$* when the command should be run as a normal user
   10:  * *#* when the command should be run as root
   11: 
   12: * *text* - text to display as program listing.
   13: 
   14: ## Examples
   15: 
   16: [[!template id=programlisting text="""
   17: $ uname
   18: NetBSD
   19: $ cd /bin
   20: $ ls
   21: [          cpio       domainname kill       mt         rcmd       sleep
   22: cat        csh        echo       ksh        mv         rcp        stty
   23: chio       date       ed         ln         pax        rm         sync
   24: chmod      dd         expr       ls         ps         rmdir      tar
   25: cp         df         hostname   mkdir      pwd        sh         test
   26: """]]
   27: 
   28: is obtained with:
   29: 
   30:     \[[!template id=programlisting text="""
   31:     $ uname
   32:     NetBSD
   33:     $ cd /bin
   34:     $ ls
   35:     [          cpio       domainname kill       mt         rcmd       sleep
   36:     cat        csh        echo       ksh        mv         rcp        stty
   37:     chio       date       ed         ln         pax        rm         sync
   38:     chmod      dd         expr       ls         ps         rmdir      tar
   39:     cp         df         hostname   mkdir      pwd        sh         test
   40:     """]]
   41: 
   42: </TMPL_UNLESS>

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb