From 4f915fc8024f421ff5fb6b6edafbd3781985527a Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Thu, 30 Sep 2021 08:47:00 -0700 Subject: [PATCH] misc cleanup --- home/zshrc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/home/zshrc b/home/zshrc index efde2b4..1d4bf8f 100644 --- a/home/zshrc +++ b/home/zshrc @@ -248,13 +248,12 @@ reload() { ### @- # to remedy this, when args are passed, invoke initctl instead. if [ $# -gt 0 ]; then "${commands[reload]:?initctl is missing}" "$@" - return $? + return # preserves $? fi - # this doesn't seem to help with _vim_files errors, eh. - # you wanna rm .zcompdump first, then exit. that's why! - cd ~ - if [ $? -eq 0 ]; then + if cd; then + # this doesn't seem to help with _vim_files errors, eh. + # you wanna rm .zcompdump first, then exit. that's why! [ -f .zshrc ] && zrecompile -p .zshrc [ -f .prezto-compinit ] && zrecompile -p .prezto-compinit rm -f .zcompdump .zshrc.zwc.old .zcompdump.zwc.old