aboutsummaryrefslogtreecommitdiff
path: root/vi-mode.sh
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-06-04 00:02:36 +0200
committersrdusr <trevorgray@srdusr.com>2023-06-04 00:02:36 +0200
commitce387ecd93f82daeb4a8cb2012687a80f55e22e9 (patch)
tree43074bc910702718264f91c54b97e50edb3e01aa /vi-mode.sh
parentf010bef6b4eb0e252bde35e180d31573dfec330b (diff)
downloaddotfiles-ce387ecd93f82daeb4a8cb2012687a80f55e22e9.tar.gz
dotfiles-ce387ecd93f82daeb4a8cb2012687a80f55e22e9.zip
Add else statement if unsupported shell
Diffstat (limited to 'vi-mode.sh')
-rw-r--r--vi-mode.sh28
1 files changed, 15 insertions, 13 deletions
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