diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2008-03-13 00:23:32 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-03-13 00:33:52 +0100 |
commit | 89e4dce48f5a8dee3a636701d307e5033e8fe518 (patch) | |
tree | 966c52cf388c96eb267ec7ccec12c2f3e78fece1 /01_Functions.zsh | |
parent | 516f2e67926b84b1ae698471b0fe77b5d9cc1ffb (diff) |
Always truncates the path and git-branch to let a minimal free space for command prompt in the same line.
Almost 40 characters (50% of a 80-wide terminal) will always be free for the command prompt :
- the path will then be shrinked inside the remaining space available (letting at least 10 characters for the git-branch), until it reaches 10 characters min.
- the git-branch (or the named-git-rev, or the git-commit-id) will then be shrinked until 10 characters min., always displaying, if available, the parent-level (~...), and, always, the first letters of the git-branch/named-rev/commit-id.
Diffstat (limited to '01_Functions.zsh')
-rw-r--r-- | 01_Functions.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh index 18cf1c6..1b53f40 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -72,7 +72,7 @@ get_git_branch () # If neither on a named commit-ish, show abbreviated commit-id [ "$my_git_branch" == "" ] &&\ - my_git_branch="($(git-show --pretty=format:%h 2>&- | head -n1)...)" + my_git_branch="($(git-show --pretty=format:%H 2>&- | head -n1))" fi echo $my_git_branch |