257f4349747c

Add the documentation for the root and root|basename keywords.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 14 Jul 2009 07:28:42 -0400
parents f0e69918f2f3
children d8e5a4fbdcb4
branches/tags (none)
files README prompt.py

Changes

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.