mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-06-05 05:03:16 +02:00
Used more correct variable name
This commit is contained in:
parent
7742ca2566
commit
8df6fec622
1 changed files with 11 additions and 11 deletions
|
|
@ -29,12 +29,12 @@ main() {
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -n "$ZSH_PATH" ]; then
|
if [ ! -n "$ZSHRC_PATH" ]; then
|
||||||
ZSH_PATH=~
|
ZSHRC_PATH=~
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -n "$ZSH" ]; then
|
if [ ! -n "$ZSH" ]; then
|
||||||
ZSH=$ZSH_PATH/.oh-my-zsh
|
ZSH=$ZSHRC_PATH/.oh-my-zsh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$ZSH" ]; then
|
if [ -d "$ZSH" ]; then
|
||||||
|
|
@ -70,17 +70,17 @@ main() {
|
||||||
|
|
||||||
|
|
||||||
printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n"
|
printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n"
|
||||||
if [ -f $ZSH_PATH/.zshrc ] || [ -h $ZSH_PATH/.zshrc ]; then
|
if [ -f $ZSHRC_PATH/.zshrc ] || [ -h $ZSHRC_PATH/.zshrc ]; then
|
||||||
printf "${YELLOW}Found $ZSH_PATH/.zshrc.${NORMAL} ${GREEN}Backing up to $ZSH_PATH/.zshrc.pre-oh-my-zsh${NORMAL}\n";
|
printf "${YELLOW}Found $ZSHRC_PATH/.zshrc.${NORMAL} ${GREEN}Backing up to $ZSHRC_PATH/.zshrc.pre-oh-my-zsh${NORMAL}\n";
|
||||||
mv $ZSH_PATH/.zshrc $ZSH_PATH/.zshrc.pre-oh-my-zsh;
|
mv $ZSHRC_PATH/.zshrc $ZSHRC_PATH/.zshrc.pre-oh-my-zsh;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "${BLUE}Using the Oh My Zsh template file and adding it to $ZSH_PATH/.zshrc${NORMAL}\n"
|
printf "${BLUE}Using the Oh My Zsh template file and adding it to $ZSHRC_PATH/.zshrc${NORMAL}\n"
|
||||||
cp "$ZSH"/templates/zshrc.zsh-template $ZSH_PATH/.zshrc
|
cp "$ZSH"/templates/zshrc.zsh-template $ZSHRC_PATH/.zshrc
|
||||||
sed "/^export ZSH=/ c\\
|
sed "/^export ZSH=/ c\\
|
||||||
export ZSH=\"$ZSH\"
|
export ZSH=\"$ZSH\"
|
||||||
" $ZSH_PATH/.zshrc > $ZSH_PATH/.zshrc-omztemp
|
" $ZSHRC_PATH/.zshrc > $ZSHRC_PATH/.zshrc-omztemp
|
||||||
mv -f $ZSH_PATH/.zshrc-omztemp $ZSH_PATH/.zshrc
|
mv -f $ZSHRC_PATH/.zshrc-omztemp $ZSHRC_PATH/.zshrc
|
||||||
|
|
||||||
# If this user's login shell is not already "zsh", attempt to switch.
|
# If this user's login shell is not already "zsh", attempt to switch.
|
||||||
TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
|
TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
|
||||||
|
|
@ -105,7 +105,7 @@ main() {
|
||||||
echo ' /____/ ....is now installed!'
|
echo ' /____/ ....is now installed!'
|
||||||
echo ''
|
echo ''
|
||||||
echo ''
|
echo ''
|
||||||
echo 'Please look over the $ZSH_PATH/.zshrc file to select plugins, themes, and options.'
|
echo 'Please look over the $ZSHRC_PATH/.zshrc file to select plugins, themes, and options.'
|
||||||
echo ''
|
echo ''
|
||||||
echo 'p.s. Follow us at https://twitter.com/ohmyzsh.'
|
echo 'p.s. Follow us at https://twitter.com/ohmyzsh.'
|
||||||
echo ''
|
echo ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue