Permalink
Browse files

external config

Squashed commit of the following:

commit d2dd640947b803bfd0df4c68b841457ce543995d
Author: Leonid Volnitsky <Leonid@Volnitsky.com>
Date:   Wed Mar 11 21:29:49 2009 +0200

    -- if max_file_list_lenght==0  (disabled), then do not display "..."

commit 4dc94f9668b797142cbd525d2fc9137f615bc2db
Author: Leonid Volnitsky <Leonid@Volnitsky.com>
Date:   Wed Mar 11 21:19:09 2009 +0200

    -- switch git_module works

commit 7d7d3e1996d6834f2cccc900ac5bc626ff2ce6bb
Author: Leonid Volnitsky <Leonid@Volnitsky.com>
Date:   Sun Mar 8 19:41:47 2009 +0200

    -- colors are  working

commit f1a8382bd7c4b2b1c27fc9908efa54f74290f06a
Merge: 876c85e 4a8777a
Author: Leonid Volnitsky <Leonid@Volnitsky.com>
Date:   Sun Mar 8 18:25:52 2009 +0200

    Merge branch 'master' into config

    Conflicts:
    	index.txt

commit 876c85e87090c7de5740538666bdf558e30923b9
Author: Leonid Volnitsky <Leonid@Volnitsky.com>
Date:   Fri Feb 20 13:44:52 2009 +0200

    -- conf
  • Loading branch information...
1 parent 4a8777a commit 646ca93318631d89fb22d4c26ba1a60eaca2c204 @lvv lvv committed Mar 13, 2009
View
@@ -1,7 +1,7 @@
-#install:
-# cp git-prompt.sh /etc/
-# [ -s /etc/prompt ] || ln -sf /etc/git-prompt.sh /etc/prompt
+install:
+ cp -v git-prompt.{sh,conf} /etc/
+
tgit:
xclip -i git-demo
echo "ready to paste ..."
@@ -10,13 +10,13 @@ WEB_DESTDIR ?= /tmp/html
ASCIIDOC ?= asciidoc
-show: web_install
+show: localweb
firefox $(WEB_DESTDIR)/index.html
index.html: index.txt
$(ASCIIDOC) -o $@ $<
-web_install: index.html *.png git-prompt.sh
+localweb: index.html *.png git-prompt.sh
mkdir -p $(WEB_DESTDIR)
cp -uv $^ $(WEB_DESTDIR)
View
1 README
@@ -30,6 +30,7 @@ DEPENDENCY
TODO
+ - git locked state if .git/index.lock exist
- external config at /etc/git-prompt.conf and ~/.git-prompt.conf
- avoid wrapping to 2nd line if file list is too long - check current terminal width
- new mail (howto at: http://kikhome.net/?p=11)
View
@@ -0,0 +1,37 @@
+set +xv
+. /t/prompt/prompt
+test -d demo && rm -rf demo/
+test -d ../demo && cd .. && rm -rf demo/
+clear
+: ------------------------------------------------------------------------
+mkdir demo
+cd demo
+git init
+echo 'main() {puts("Hello World!");}' > hello.c
+make hello && ./hello
+git add hello.c
+git commit -q -m "1st hello"
+git checkout -b universe; git clean -f
+echo 'main() {puts("Hello Universe!");}' > hello.c
+git add hello.c
+echo "// FIXME: includes" >> hello.c
+git add hello.c
+git commit -q -m "notes to self"
+git checkout master
+cat hello.c
+echo 'main() {puts("Hello Universe!"); exit(0);}' > hello.c
+git add hello.c
+git commit -q -m "fixed exit code"
+git merge universe
+git cat-file -p universe:hello.c > hello.c
+git add hello.c
+git commit -q -m "merged"
+cat hello.c
+git checkout HEAD^
+git checkout HEAD^
+cat hello.c
+git checkout master
+sleep 2; echo "this emulates unsaved vim session" > .hello.c.swp
+git clean -f
+: ------------------------------------------------------------------------
+cd ..
View
@@ -0,0 +1,40 @@
+cd p/git-prompt
+. ./git-prompt.sh
+cd
+test -d demo && rm -rf demo/
+test -d ../demo && cd .. && rm -rf demo/
+clear
+: ------------------------------------------------------------------------
+clear
+mkdir demo
+cd demo
+git init
+echo "1st line" > FOO
+git add FOO
+touch untracked.o
+echo '*.o' >> .gitignore
+git commit -q -m "1st line" FOO
+git checkout -b test
+echo "added 2nd line in test" >> FOO
+git add FOO
+echo "2nd in BAR" > BAR
+git add BAR
+echo "added 3nd line FOO" >> FOO
+git add FOO
+git commit -q -m "FOO moded, BAR added"
+git checkout master
+cat FOO
+echo "now added 2nd line in master" >> FOO
+git add FOO
+git commit -q -m "2nd line"
+git merge test
+git cat-file -p test:FOO > FOO
+git add FOO
+git commit -q -m "merged"
+cat FOO
+git checkout HEAD^
+cat FOO
+git checkout HEAD
+git clean -f
+: ------------------------------------------------------------------------
+cd ..
View
@@ -0,0 +1,53 @@
+# git-prompt.sh config
+#
+# commented-out variales are default values
+
+
+##### MODULES
+#git_module=on
+#svn_module=off
+#vim_module=on
+
+
+### Default objects are not displayed
+#default_user=lvv
+#default_host="ahp" # remote host is always shown
+#default_domain="lvvnet"
+
+
+##### dir, exit code, root color
+#if [ 0`tput colors` -ge 8 ]; then # if terminal supports colors
+ # dir_color=CYAN
+ # rc_color=red
+ # root_id_color=magenta
+#else # B/W terminal
+ # dir_color=bw_bold
+ # rc_color=bw_bold
+#fi
+
+##### Per host color .If not set, color derived from host-name checksum)
+## variable name is uppercase-short-hostname with appended "_host_color"
+## Per host color. If not set, color derived from host-name checksum)
+## Example per-host-color config:
+##
+## TASHA_host_color=cyan
+## AL_host_color=green
+## LVV_host_color=blue
+## AHP_host_color=white
+
+
+
+##### VCS state colors
+# init_vcs_color=WHITE # initial
+# clean_vcs_color=blue # nothing to commit (working directory clean)
+# modified_vcs_color=red # Changed but not updated:
+# added_vcs_color=green # Changes to be committed:
+# mixed_vcs_color=yellow #
+# untracked_vcs_color=BLUE # Untracked files:
+# op_vcs_color=MAGENTA
+# detached_vcs_color=RED
+
+# max_file_list_length=100
+
+
+: vim:ft=sh:
Oops, something went wrong.

0 comments on commit 646ca93

Please sign in to comment.