SyntaxHighlight: Difference between revisions

From Leo's Notes
This page was last edited on 23 August 2017, at 18:29.
No edit summary
Line 21: Line 21:
leo@nas:/data/vm% ls
leo@nas:/data/vm% ls
backup_vms  esxi-backup/  ghettoVCB.conf  ghettoVCB.sh*
backup_vms  esxi-backup/  ghettoVCB.conf  ghettoVCB.sh*
}}
Empty # will cause the next # to be a comment, even if they are on different lines:
{{highlight|lang=terminal|code=
# gpart create -s GPT /dev/ada1
# gpart add -b 2048 -s 1953113520 -t freebsd-zfs -l disk01 /dev/ada1
#
# gpart create -s GPT /dev/ada2
# gpart add -b 2048 -s 1953113520 -t freebsd-zfs -l disk02 /dev/ada2
#
# gpart create -s GPT /dev/ada3
# gpart add -b 2048 -s 1953113520 -t freebsd-zfs -l disk03 /dev/ada3
}}
}}

Revision as of 18:29, 23 August 2017

The plugin being used is from http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

Usage

To use SyntaxHighlight on this wiki, use the Highlight template.

{{highlight|lang=terminal|code=
code goes here
}}

Issues

The ESXi default shell and zsh % shell are not highlighting properly

[root@server:/vmfs/volumes/ee8ff6f0-af4dbc98] sh ./ghettoVCB.sh -f backup_vms

leo@nas:/data/vm% ls
backup_vms  esxi-backup/  ghettoVCB.conf  ghettoVCB.sh*


Empty # will cause the next # to be a comment, even if they are on different lines:

# gpart create -s GPT /dev/ada1
# gpart add -b 2048 -s 1953113520 -t freebsd-zfs -l disk01 /dev/ada1
#
# gpart create -s GPT /dev/ada2
# gpart add -b 2048 -s 1953113520 -t freebsd-zfs -l disk02 /dev/ada2
#
# gpart create -s GPT /dev/ada3
# gpart add -b 2048 -s 1953113520 -t freebsd-zfs -l disk03 /dev/ada3