From be3816d83d8e0e01bf6405508290184c4a549421 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 12 Mar 2021 10:50:05 +0000 Subject: [PATCH] Fix cd change on commit-pkm --- bash/.bash_functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bash/.bash_functions b/bash/.bash_functions index e9118d4..4a11904 100644 --- a/bash/.bash_functions +++ b/bash/.bash_functions @@ -55,6 +55,7 @@ function demoprompt() { function commit-pkm() { if [ -d $HOME/Documents/pkm ]; then + prevdir=$PWD cd ~/Documents/pkm if [[ `git status --porcelain` ]]; then echo "Changes detected, commiting..." @@ -62,5 +63,6 @@ function commit-pkm() { else echo "No changes detected" fi + cd $PREVDIR fi -} \ No newline at end of file +}