mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Use safe temp file instead of using sed buffers
https://github.com/robbyrussell/oh-my-zsh/pull/3257#issuecomment-60358947
This commit is contained in:
parent
d9e068f3f0
commit
36acc795b9
1 changed files with 4 additions and 2 deletions
|
|
@ -25,12 +25,14 @@ echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[
|
|||
cp $ZSH/templates/zshrc.zsh-template ~/.zshrc
|
||||
sed -e "/^ZSH=/ c\\
|
||||
ZSH=$ZSH
|
||||
" ~/.zshrc | tee ~/.zshrc
|
||||
" ~/.zshrc > ~/.zshrc.omztemplate
|
||||
mv -f ~/.zshrc.omztemplate ~/.zshrc
|
||||
|
||||
echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m"
|
||||
sed -e "/export PATH=/ c\\
|
||||
export PATH=\"$PATH\"
|
||||
" ~/.zshrc | tee ~/.zshrc
|
||||
" ~/.zshrc > ~/.zshrc.newpath
|
||||
mv -f ~/.zshrc.newpath ~/.zshrc
|
||||
|
||||
if [ "$SHELL" != "$(which zsh)" ]; then
|
||||
echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue