Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prompt fix and README update

  • Loading branch information...
commit 6e4b9f99206ed0efe5e34807f33ebc85c0ea3b2d 1 parent 5b9591a
Dan Fleming authored
Showing with 17 additions and 18 deletions.
  1. +7 −6 README.md
  2. +10 −12 zsh/prompt.zsh
13 README.md
View
@@ -7,7 +7,7 @@ Mostly based on [holman's](http://github.com/holman) topically-organized dotfile
* [rbenv](https://github.com/sstephenson/rbenv#installation) is optional, but recommended `brew install rbenv ruby-build`
## what's this gonna do?
-* Install some Homebrew dependencies ([grc](http://korpus.juls.savba.sk/~garabik/software/grc.html), [coreutils](http://www.gnu.org/software/coreutils)).
+* Install some Homebrew dependencies and neat stuff.
* Symlink each `FILENAME.symlink` to `~/.FILENAME`.
* Every `*.zsh` file will get sourced.
* Autocompletion loaded from `completion.zsh` files in topic folders.
@@ -23,10 +23,11 @@ script/bootstrap
## .dotfiles of interest
* [dotfiles.github.com](http://dotfiles.github.com): Growing list of resources (follow [@octodots](http://www.twitter.com/octodots) for the latest-and-greatest)
-* [holman/dotfiles](http://github.com/holman/dotfiles): Bootstrapping, topicality, ZSH config, vim config
-* [rtomayko/dotfiles](https://github.com/rtomayko/dotfiles): Some scripts (and symlinking `bitch,` to `sudo`. Genius.)
-* [garybernhardt/dotfiles](https://github.com/garybernhardt/dotfiles): Git scripts and gitconfig. Great stuff. A+ would recommend.
+* [holman/dotfiles](http://github.com/holman/dotfiles): Bootstrapping, topicality, ZSH config
+* [rtomayko/dotfiles](https://github.com/rtomayko/dotfiles): Scripts
+* [garybernhardt/dotfiles](https://github.com/garybernhardt/dotfiles): Git hotness
+* [mathiasbynens/dotfiles](https://github.com/mathiasbynens/dotfiles): OSX goodness
## todo
-* Script for installing common homebrew recipes
-* Clean up
+* [cowboy/dotfiles](https://github.com/cowboy/dotfiles)
+* [skwp/dotfiles](https://github.com/skwp/dotfiles)
22 zsh/prompt.zsh
View
@@ -14,19 +14,18 @@ git_branch() {
}
git_dirty() {
- st=$($git status 2>/dev/null | tail -n 1)
- if [[ $st == "" ]]
- then
- echo ""
- else
- bch=$(git_prompt_info)
- if [[ -z "$bch" ]]; then bch='untracked'; fi
- if [[ "$st" =~ ^nothing ]]
- then
- echo "on %{$fg_bold[green]%}${bch}%{$reset_color%}"
+ branch_name=$(git_prompt_info)
+ state=$($git status --porcelain 2>/dev/null | tail -n 1)
+
+ if [[ ! -z "$branch_name" || ! -z "$state" ]]; then
+ if [[ -z "$branch_name" ]]; then branch_name='UNTRACKED'; fi
+ if [[ "$state" = "" ]]; then
+ echo "on %{$fg_bold[green]%}${branch_name}%{$reset_color%}"
else
- echo "on %{$fg_bold[red]%}${bch}%{$reset_color%}"
+ echo "on %{$fg_bold[red]%}${branch_name}%{$reset_color%}"
fi
+ else
+ echo ''
fi
}
@@ -36,7 +35,6 @@ git_prompt_info () {
}
unpushed () {
- #$git cherry -v `$git config --get branch.master.remote`/$(git_branch) 2>/dev/null
$git cherry -v @{upstream} 2>/dev/null
}
Please sign in to comment.
Something went wrong with that request. Please try again.