From e28fd95ce89351c2e38b2fff4d6c9bfec7b3c052 Mon Sep 17 00:00:00 2001 From: Aaron Fischer Date: Mon, 6 Dec 2021 15:04:28 +0100 Subject: [PATCH] Small path adjustments --- c.sh | 5 +++-- zsh.config | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/c.sh b/c.sh index 8f604a7..3afdad2 100644 --- a/c.sh +++ b/c.sh @@ -2,7 +2,7 @@ [[ $# -eq 0 ]] && echo "no subcommand given" && exit 1 -WORKDIR="$(dirname "$(realpath "$0")")" +WORKDIR="$(dirname "$(realpath "$0")")/repo" PWD=`pwd` RESOURCE_TO_TRACK="" @@ -14,7 +14,7 @@ case $1 in "commit") shift MESSAGE="$*" - [[ "$MESSAGE" = "" ]] && MESSAGE="config.sh commit from $HOSTNAME" + [[ "$MESSAGE" = "" ]] && MESSAGE="c.sh commit from $HOSTNAME" git add --all git commit -m "$MESSAGE" ;; @@ -61,6 +61,7 @@ case $1 in echo "push (push the changes to git)" echo "track (add a file or folder to git)" echo "diff (show unpushed changes)" + echo "log (show last commits)" ;; esac diff --git a/zsh.config b/zsh.config index 4842d85..d4f89e7 100644 --- a/zsh.config +++ b/zsh.config @@ -1,6 +1,6 @@ CSTATUS="" update_cstatus() { - git_stat=`cd /opt/tools/server-config/; git diff --shortstat | tr -c -d '[0-9,]'` + git_stat=`cd /opt/tools/c/; git diff --shortstat | tr -c -d '[0-9,]'` if [[ "$git_stat" = "" ]]; then CSTATUS="" else @@ -16,5 +16,5 @@ add-zsh-hook precmd update_cstatus setopt PROMPT_SUBST PS1='%T $CSTATUS %(?.%F{green}√.%F{red}?%?)%f %F{#666}%~%f %# ' -alias c="/opt/tools/server-config/c.sh" +alias c="/opt/tools/c/c.sh"