026e4e499e6b01ebe4b6d9748c6e2eb182ad1359
- Author
- Jackson Delahunt <jackson@jacksondelahunt.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
installer: make TEST_CURRENT_SHELL use basename (#7514)
Fixes #7492
Diff
1diff --git a/tools/install.sh b/tools/install.sh
2index 0cc020053b9bf8797d43e01af11d3d657dd1bc96..2fb87cdafe132da2b7308848331f6d5dab48c24e 100755
3--- a/tools/install.sh
4+++ b/tools/install.sh
5@@ -79,7 +79,7 @@ main() {
6 mv -f ~/.zshrc-omztemp ~/.zshrc
7
8 # If this user's login shell is not already "zsh", attempt to switch.
9- TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
10+ TEST_CURRENT_SHELL=$(basename "$SHELL")
11 if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then
12 # If this platform provides a "chsh" command (not Cygwin), do it, man!
13 if hash chsh >/dev/null 2>&1; then