From 635ca4e47b8359a432d9ac45526b54731344285d Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Wed, 29 Oct 2014 08:34:11 +0200 Subject: -- it seems some script modified all my PNGs --- screenshot-labels.png | Bin 200455 -> 228712 bytes screenshot-prompt-basic.png | Bin 16849 -> 21958 bytes screenshot-prompt-git.png | Bin 147592 -> 184687 bytes screenshot-svn.png | Bin 12835 -> 12996 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/screenshot-labels.png b/screenshot-labels.png index 71f3513..4032700 100644 Binary files a/screenshot-labels.png and b/screenshot-labels.png differ diff --git a/screenshot-prompt-basic.png b/screenshot-prompt-basic.png index 237e0ec..13c31c5 100644 Binary files a/screenshot-prompt-basic.png and b/screenshot-prompt-basic.png differ diff --git a/screenshot-prompt-git.png b/screenshot-prompt-git.png index eccbc3e..3618a28 100644 Binary files a/screenshot-prompt-git.png and b/screenshot-prompt-git.png differ diff --git a/screenshot-svn.png b/screenshot-svn.png index 6b9dec7..97fa06c 100644 Binary files a/screenshot-svn.png and b/screenshot-svn.png differ -- cgit v1.2.3 From bc4d1cf6f0d39d4ba05c87b78fd2758d3946e829 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Ruel Date: Mon, 31 Aug 2015 11:12:12 -0400 Subject: Fix $HOME -> ~ substitution regression in fd0b88da. \~ is needed in bash 4.3. --- git-prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-prompt.sh b/git-prompt.sh index d1e88b3..218c5b8 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -177,7 +177,7 @@ cwd_truncate() { # arg1: max path lenght # returns abbrivated $PWD in public "cwd" var - cwd="${PWD/$HOME/~}" # substitute "~" + cwd="${PWD/$HOME/\~}" # substitute "~" case $1 in full) -- cgit v1.2.3 From 69f92eed2fdb79bbf67e9d20fcfcc5c27888678a Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Sat, 20 Feb 2016 14:08:43 +0200 Subject: fix: current directory display, was not abbrivated at home dir --- git-prompt.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/git-prompt.sh b/git-prompt.sh index d1e88b3..cd41fbe 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -177,7 +177,15 @@ cwd_truncate() { # arg1: max path lenght # returns abbrivated $PWD in public "cwd" var + if [[ $PWD == $HOME ]]; then + cwd="~" + return + else + cwd=$PWD + fi + cwd="${PWD/$HOME/~}" # substitute "~" + return case $1 in full) @@ -423,6 +431,7 @@ parse_git_status() { #git_dir=` git rev-parse --git-dir 2> /dev/null` [[ -n ${git_dir/./} ]] || return 1 + [[ -f ${git_dir}/git-prompt-ignored ]] && return 1 vcs=git -- cgit v1.2.3