# HG changeset patch # User Steve Losh # Date 1247570922 14400 # Node ID 257f4349747c084abb0c0b170183041cc96537b7 # Parent f0e69918f2f3fbf3662c51d706c4394e6b73bb17 Add the documentation for the root and root|basename keywords. diff -r f0e69918f2f3 -r 257f4349747c README --- a/README Tue Jul 14 07:23:46 2009 -0400 +++ b/README Tue Jul 14 07:28:42 2009 -0400 @@ -54,6 +54,8 @@ * **bookmark:** the current bookmark * **branch:** the current branch +* **root:** the full path to the root of the current repository, with a trailing slash. +* **root|basename:** the directory name of the root of the current repository. For example, if the repository is in `/home/u/myrepo` then this keyword would expand to `myrepo`. * **status:** `!` if the repository has any changed/added/removed files, otherwise `?` if it has any untracked (but not ignored) files, otherwise nothing Putting it in a Bash Prompt diff -r f0e69918f2f3 -r 257f4349747c prompt.py --- a/prompt.py Tue Jul 14 07:23:46 2009 -0400 +++ b/prompt.py Tue Jul 14 07:28:42 2009 -0400 @@ -48,6 +48,11 @@ - bookmark: the current bookmark - branch: the current branch + - root: the full path to the root of the current repository, with a + trailing slash. + - root|basename: the directory name of the root of the current + repository. For example, if the repository is in '/home/u/myrepo' + then this keyword would expand to 'myrepo'. - status: "!" if the current repository contains files that have been modified, added, removed, or deleted, otherwise "?" if it contains untracked (and not ignored) files, otherwise nothing.