From c1047c1ea1a6c8008159836182eb65a52f7a1fd3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 23 Dec 2014 16:18:51 +0300 Subject: Fix style in shell scripts. --- status.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'status.sh') diff --git a/status.sh b/status.sh index 1aa3e26..e0be46a 100755 --- a/status.sh +++ b/status.sh @@ -4,13 +4,13 @@ function status { if [ ! -d "$1" ]; then return fi - DIR=`pwd` + DIR=$(pwd) cd "$1" - STR=`git diff --stat --color=always` - STR2=`git status|grep -E "Your branch is (behind|ahead)"` - STR3=`git status -s -uno` + STR=$(git diff --stat --color=always) + STR2=$(git status|grep -E "Your branch is (behind|ahead)") + STR3=$(git status -s -uno) if [[ "${CMD}" == "commit" || "${CMD}" == "c" ]]; then - COMMIT=`git rev-parse HEAD` + COMMIT=$(git rev-parse HEAD) echo -e "$2: \e[1;33m${COMMIT}\e[0m" fi if [[ -n "${STR}${STR2}${STR3}" ]]; then @@ -26,7 +26,7 @@ function status { echo -e "\e[1;33m${STR3}\e[0m" fi fi - cd $DIR + cd "$DIR" } CMD="$1" -- cgit v1.2.3-60-g2f50