From ce387ecd93f82daeb4a8cb2012687a80f55e22e9 Mon Sep 17 00:00:00 2001 From: srdusr Date: Sun, 4 Jun 2023 00:02:36 +0200 Subject: Add else statement if unsupported shell --- vi-mode.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'vi-mode.sh') diff --git a/vi-mode.sh b/vi-mode.sh index a3f70e0..a46f042 100644 --- a/vi-mode.sh +++ b/vi-mode.sh @@ -95,18 +95,20 @@ elif [[ -n "$BASH_VERSION" ]]; then # Fix backspace bug when switching modes stty erase '^?' +else + echo "Unsupported shell" fi -# Reload .bashrc or .bash_profile file if using bash -if [[ -n "$BASH_VERSION" ]]; then - if [[ -f "$HOME/.bashrc" ]]; then - source ~/.bashrc - elif [[ -f "$HOME/.bash_profile" ]]; then - source ~/.bash_profile - fi -fi - -# Reload .zshrc file if using zsh -if [[ -n "$ZSH_VERSION" ]]; then - source ~/.zshrc -fi +## Reload .bashrc or .bash_profile file if using bash +#if [[ -n "$BASH_VERSION" ]]; then +# if [[ -f "$HOME/.bashrc" ]]; then +# source ~/.bashrc +# elif [[ -f "$HOME/.bash_profile" ]]; then +# source ~/.bash_profile +# fi +#fi +# +## Reload .zshrc file if using zsh +#if [[ -n "$ZSH_VERSION" ]]; then +# source ~/.zshrc +#fi -- cgit v1.2.3