hg-prompt: Update documentation.
Changes
--- a/hg-prompt/documentation/index.html Fri Nov 27 13:48:20 2009 -0500
+++ b/hg-prompt/documentation/index.html Wed Dec 02 02:13:39 2009 -0500
@@ -40,6 +40,8 @@
<p>How the <code>hg prompt</code> command can be used.</p>
<h2 id="keywordshg-promptdocumentationkeywords"><a href="/hg-prompt/documentation/keywords/">Keywords</a></h2>
<p>Keywords available to use with the command.</p>
+<h2 id="sample-promptshg-promptdocumentationsamples"><a href="/hg-prompt/documentation/samples/">Sample Prompts</a></h2>
+<p>Some sample prompts to get you started.</p>
</div> <!-- div#content -->
--- a/hg-prompt/documentation/list.html Fri Nov 27 13:48:20 2009 -0500
+++ b/hg-prompt/documentation/list.html Wed Dec 02 02:13:39 2009 -0500
@@ -56,6 +56,14 @@
<tr>
<td class="name">
+ <a class="dirlink" href="/hg-prompt/documentation/samples/">
+ samples/
+ </a>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="name">
<a class="dirlink" href="/hg-prompt/documentation/usage/">
usage/
</a>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hg-prompt/documentation/samples/index.html Wed Dec 02 02:13:39 2009 -0500
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+
+ <title>
+ hg-prompt » Sample Prompts
+ </title>
+
+ <link rel="stylesheet" type="text/css" href="/hg-prompt/media/css/reset.css" media="screen, projection" />
+ <link rel="stylesheet" type="text/css" href="/hg-prompt/media/css/layout.css" media="screen, projection" />
+ <link rel="stylesheet" type="text/css" href="/hg-prompt/media/css/typography.css" media="screen, projection" />
+ <link rel="stylesheet" type="text/css" href="/hg-prompt/media/css/pygments.css" media="screen, projection" />
+ </head>
+
+ <body>
+
+ <div id="breadcrumbs">
+ <p>
+
+
+ <a href="/hg-prompt/">index</a> »
+
+
+
+ <a href="/hg-prompt/documentation/">documentation</a> »
+
+
+
+ samples
+
+
+ </p>
+ </div> <!-- div#breadcrumbs -->
+
+
+ <div id="content">
+
+
+ <h1 id="sample-prompts">Sample Prompts</h1>
+<p><code>hg-prompt</code> supports many keywords, but you probably don't want to use them
+all at once. Which keywords you'll find useful depends on the workflow(s) you
+commonly use.</p>
+<p>Here are some example prompts to get you started.</p>
+<h2 id="a-basic-prompt">A Basic Prompt</h2>
+<p>A very simple prompt could tell you:</p>
+<ul>
+<li>Which named branch you're currently working on.</li>
+<li>If there are any uncommitted changes in the working directory.</li>
+<li>If you're at a revision that's not a branch tip (i.e. if running <code>hg update</code> would do something).</li>
+</ul>
+<p>To get a prompt like this you could add this to your <code>~/.bashrc</code> file:</p>
+<div class="codehilite"><pre><span class="nb">export </span><span class="nv">PS1</span><span class="o">=</span><span class="s1">'\u in \w`hg prompt "{on {branch}}{status}{update}" 2>/dev/null` $'</span>
+</pre></div>
+
+
+<p>The result would look something like this:</p>
+<div class="codehilite"><pre>username in ~/src $ cd project
+username in ~/src/project on feature-branch $ touch sample
+username in ~/src/project on feature-branch? $ hg add sample
+username in ~/src/project on feature-branch! $ hg commit -m 'Add a file.'
+username in ~/src/project on feature-branch $ hg update default
+username in ~/src/project on default $ hg update 0
+username in ~/src/project on default^ $
+</pre></div>
+
+
+<p>The <code>2>/dev/null</code> part of the prompt command prevents errors from showing when
+you're not currently in a Mercurial repository.</p>
+<p>The keywords (<code>{branch}</code>, <code>{status}</code> and <code>{update}</code>) display the relevant
+information.</p>
+<p>The extra text in the <code>{branch}</code> keyword will only display if a branch exists,
+so you won't see the word "on" if you're not in a repository.</p>
+<h2 id="a-more-compact-basic-prompt">A More Compact Basic Prompt</h2>
+<p>Some people prefer a smaller, less obtrusive prompt. To get that kind of
+prompt you can omit some of the less important text:</p>
+<div class="codehilite"><pre><span class="nb">export </span><span class="nv">PS1</span><span class="o">=</span><span class="s1">'\w`hg prompt "[{branch}{status}{update}]" 2>/dev/null` $'</span>
+</pre></div>
+
+
+<p>That will give you something like this:</p>
+<div class="codehilite"><pre>~/src $ cd project
+~/src/project[feature-branch] $ touch sample
+~/src/project[feature-branch?] $ hg add sample
+~/src/project[feature-branch!] $ hg commit -m 'Add a file.'
+~/src/project[feature-branch] $ hg update default
+~/src/project[default] $ hg update 0
+~/src/project[default^] $
+</pre></div>
+
+
+ </div> <!-- div#content -->
+ <div id="footer">
+ <p>
+
+ hg-prompt —
+
+ Powered by <a href="http://bitbucket.org/zacharyvoase/markdoc">Markdoc</a>.
+ </p>
+ </div>
+
+ </body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hg-prompt/documentation/samples/list.html Wed Dec 02 02:13:39 2009 -0500
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+
+ <title>
+ hg-prompt » ls /documentation/samples
+ </title>
+
+ <link rel="stylesheet" type="text/css" href="/hg-prompt/media/css/reset.css" media="screen, projection" />
+ <link rel="stylesheet" type="text/css" href="/hg-prompt/media/css/layout.css" media="screen, projection" />
+ <link rel="stylesheet" type="text/css" href="/hg-prompt/media/css/typography.css" media="screen, projection" />
+ <link rel="stylesheet" type="text/css" href="/hg-prompt/media/css/pygments.css" media="screen, projection" />
+ </head>
+
+ <body>
+
+ <div id="breadcrumbs">
+ <p>
+
+
+ <a href="/hg-prompt/">index</a> »
+
+
+
+ <a href="/hg-prompt/documentation/">documentation</a> »
+
+
+
+ <a href="/hg-prompt/documentation/samples/">samples</a> »
+
+
+
+ <span class="list-crumb">list</span>
+
+
+ </p>
+ </div> <!-- div#breadcrumbs -->
+
+
+ <div id="content">
+
+
+ <h1><code>ls /documentation/samples</code></h1>
+
+
+
+
+
+
+
+
+ </div> <!-- div#content -->
+ <div id="footer">
+ <p>
+
+ hg-prompt —
+
+ Powered by <a href="http://bitbucket.org/zacharyvoase/markdoc">Markdoc</a>.
+ </p>
+ </div>
+
+ </body>
+</html>
\ No newline at end of file