We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1278970 commit 01a22feCopy full SHA for 01a22fe
history-sync.plugin.zsh
@@ -271,6 +271,7 @@ history_sync_push() {
271
[Yy]* )
272
DIR=$(pwd)
273
cd "$ZSH_HISTORY_PROJ" && GIT add * && GIT commit -m "$ZSH_HISTORY_COMMIT_MSG"
274
+ local status=$?
275
276
if [[ $force = false ]]; then
277
echo -n "$bold_color${fg[yellow]}Do you want to push to remote (y/N)?$reset_color "
@@ -283,19 +284,14 @@ history_sync_push() {
283
284
case "$push" in
285
286
GIT push
- if [[ "$?" != 0 ]]; then
287
- _print_git_error_msg
288
- cd "$DIR"
289
- return
290
- fi
291
+ status=$?
292
;;
293
esac
294
fi
295
296
+ cd "$DIR"
+ if [[ "$status" != 0 ]]; then
297
_print_git_error_msg
298
299
return
300
301
0 commit comments