D.3. Command Prompts

There are likely as many ways of doing this as there are DocBook
authors; however, here are two ways that you might find useful.
Thanks to Y Giridhar Appaji Nag
and
Martin Brown
for the markup used here.

First create a general entity in the internal subset at the very
beginning of your document. This entity will define a name for the
shortcut which you can use to display the full prompt at any point
in your document.
<!ENTITY prompt "<prompt>[[email protected]
~/dir]$</prompt>">