dotfiles: How to separate the customization from the automatically appended lines
by blueray from LinuxQuestions.org on (#549V7)
When I installed nvm using:
Code:curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bashIt append the following lines to my .zshrc
Code:export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completionI keep a backup of my .zshrc file. However, I do not want to backup these lines (As, in the new machine where I might use the .zshrc, may not have nvm).
How can I separate my customization from the system appended lines from my dotfiles?


Code:curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bashIt append the following lines to my .zshrc
Code:export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completionI keep a backup of my .zshrc file. However, I do not want to backup these lines (As, in the new machine where I might use the .zshrc, may not have nvm).
How can I separate my customization from the system appended lines from my dotfiles?