From ddb033fbe1737a4afc026284522d60dc13def5ca Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Thu, 18 Dec 2008 20:47:16 +0200 Subject: -- docs, spelling --- Makefile | 12 ++++++------ README | 6 +++--- git-prompt.sh | 28 +++++++++++++++------------- index.txt | 3 --- 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 5c3a39b..9135ccc 100644 --- a/Makefile +++ b/Makefile @@ -6,19 +6,19 @@ tgit: xclip -i git-demo echo "ready to paste ..." -DESTDIR ?= /tmp/html-lopti +WEB_DESTDIR ?= /tmp/html-lopti ASCIIDOC ?= asciidoc -show: install - firefox $(DESTDIR)/index.html +show: web_install + firefox $(WEB_DESTDIR)/index.html index.html: index.txt $(ASCIIDOC) -o $@ $< -install: index.html *.png - mkdir -p $(DESTDIR) - cp -uv $^ $(DESTDIR) +web_install: index.html *.png + mkdir -p $(WEB_DESTDIR) + cp -uv $^ $(WEB_DESTDIR) clean: rm -f *.html diff --git a/README b/README index 655dabf..f6dfc45 100644 --- a/README +++ b/README @@ -10,7 +10,7 @@ INSTALL . /path/to/git-prompt.sh - If there are no interactivity test in your profile, then above command should be: + If there are no interactivity test, then above command should be: [[ $- == *i* ]] && . /path/to/git-prompt.sh @@ -31,8 +31,8 @@ DEPENDENCY TODO - - - TO FIX: when file list is too long, git-prompt truncates it. Sometimes this truncation can be on color escape sequence. + - TO FIX: when file list is too long, git-prompt truncates it. Sometimes this truncation can be on color escape sequence. + (fixed fot GIT, TODO for SVN) - external config at /etc/git-prompt.conf and ~/.git-prompt.conf - new mail (howto at: http://kikhome.net/?p=11) - ^Z subshell indicator diff --git a/git-prompt.sh b/git-prompt.sh index 86c707c..f8ef0d1 100644 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -38,10 +38,10 @@ op_vcs_color=MAGENTA detached_vcs_color=RED - max_untracked=2 - max_modified=4 - max_added=4 - max_file_list_lengh=100 + #max_untracked=2 + #max_modified=4 + #max_added=4 + max_file_list_length=100 ##################################################################### post config @@ -440,16 +440,17 @@ parse_vcs_dir() { [[ ${vim_files} ]] && file_list+=" "${RED}VIM:${vim_files} file_list=${file_list:+:$file_list} - if [[ ${#file_list} -gt $max_file_list_lengh ]] ; then - file_list=${file_list:0:100} + if [[ ${#file_list} -gt $max_file_list_length ]] ; then + file_list=${file_list:0:$max_file_list_length} file_list="${file_list% *} ..." fi - tail_local="($vcs_info$vcs_color${file_list}$vcs_color)" + head_local="(${vcs_info}$vcs_color${file_list}$vcs_color)" ### fringes (added depended on location) - head_local="${head_local+$vcs_color $head_local\n}" + head_local="${head_local+$vcs_color$head_local }" + above_local="${head_local+$vcs_color$head_local\n}" tail_local="${tail_local+$vcs_color $tail_local}${dir_color}" } @@ -468,10 +469,11 @@ prompt_command_function() { set_shell_title "$PWD/" - # truncate $PWD to $max - max=35 - front=7 - head=${PWD:0:$front}"..." + # TODO: put it back + # truncate $PWD to $max_path_length + # max_path_length=50 + # front=7 + # head=${PWD:0:$front}"..." parse_vcs_dir @@ -486,6 +488,6 @@ prompt_command_function() { PROMPT_COMMAND=prompt_command_function - unset rc id tty bell + unset rc id tty bell modified_files file_list # vim: set syntax=sh: diff --git a/index.txt b/index.txt index cf520c8..892737f 100644 --- a/index.txt +++ b/index.txt @@ -35,21 +35,18 @@ image:screenshot-prompt-git.png[git module] == Install Download link:git-prompt.sh[] or get with GIT: -[source,sh] ------------------ git clone git://github.com/lvv/git-prompt.git --------------- Put following command in our profile in interactive section: -[source,sh] --------------------- . /path/to/git-prompt.sh --------------------- If there are no interactivity test in your profile, then above command should be: -[source,sh] -------------------- [[ $- == *i* ]] && . /etc/git-prompt.sh --------------------- -- cgit v1.2.3