Permalink
Browse files

Add option to just show the prompt

  • Loading branch information...
1 parent 02581aa commit 1917b24836b5394ccbce121b20a8a3f3baa9039a @lennartcl committed Oct 11, 2012
Showing with 16 additions and 3 deletions.
  1. +8 −2 README.md
  2. +8 −1 gitl-setup
View
@@ -6,8 +6,14 @@ gitl
Configuration
-------------
-Put these scripts on your PATH. Optionally, run `gitl-setup` to create a
-github API key and get a list of settings to add to the `.profile`
+Just put these scripts on your PATH.
+
+If you want, you can use these scripts to customize your prompt.
+Just run `gitl-setup -p` to get a prompt that shows the current
+git branch and/or tag.
+
+To use `git-list-pull-requests`, the `gitl-setup` command can create a
+github API key and show a list of settings to add to the `.profile`
file in your home directory (only required for `git-list-pull-requests`).
Commands
View
@@ -7,6 +7,13 @@
# License: MIT
# Copyright (c) 2012 Lennart C. L. Kats
+PROMPT=' PS1='\''\[\033[01;32m\]\u:\[\033[01;34m\]$(pwd | sed "s|$HOME|~|")\[\033[0;36m\]$(git-get-branch -p)\[\033[00m\]\$ '\'
+
+if [ "$1" == "-p" ]; then
+ echo $PROMPT
+ exit
+fi
+
echo -n "github username: "
read NAME
echo -n "Logging in to github. "
@@ -38,4 +45,4 @@ fi
echo
echo Additionally, to change your prompt, add something like:
echo
-echo ' PS1='\''\[\033[01;32m\]\u:\[\033[01;34m\]$(pwd | sed "s|$HOME|~|")\[\033[0;36m\]$(git-get-branch -p)\[\033[00m\]\$ '\'
+echo $PROMPT

0 comments on commit 1917b24

Please sign in to comment.