X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=096dfabb326a5f80d73e1e429b429216cf6cd2b2;hb=1c0e5e4753d9292f554f224278c6e09ec2778625;hp=48f12fc4b0b0b70fc7866d03d6c1f4661889d0ed;hpb=b1fdce6a314b77279469fb660668143bef080577;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 48f12fc..096dfab 100644 --- a/zsh/rc +++ b/zsh/rc @@ -1,6 +1,6 @@ # Zsh configuration file. -# Copyright (C) 2011-2012 Simon Ruderich +# Copyright (C) 2011-2013 Simon Ruderich # # This file is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -297,10 +297,10 @@ if [[ $ZSH_VERSION == (4.3.<9->*|4.<4->*|<5->*) || local -a stashes # Thanks to Valodim in #zsh on Freenode (2013-07-01 14:14 CEST) # for the solution to "grep" the output with (M) and :#(...). - stashes=${#${(M)${(f)"$(git stash list 2>/dev/null)"}:#(*WIP*)}} + stashes=( ${(M)${(f)"$(git stash list 2>/dev/null)"}:#(*WIP*)} ) - if [[ $stashes -gt 0 ]]; then - hook_com[misc]+=" ${yellow}${stashes}s${default}" + if [[ ${#stashes} -gt 0 ]]; then + hook_com[misc]+=" ${yellow}${#stashes}s${default}" fi fi }