From 010bc31545f7ede794abb6eb493bd766cd6c71f4 Mon Sep 17 00:00:00 2001 From: tomit4 Date: Sun, 12 Jun 2022 09:28:17 -0700 Subject: [PATCH] "set up node version manager(nvm)" --- bashrc.txt | 8 ++++++++ updates.txt | 6 ++++-- zshrc.txt | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bashrc.txt b/bashrc.txt index e8784997..27fd448e 100644 --- a/bashrc.txt +++ b/bashrc.txt @@ -193,3 +193,11 @@ source /home/brian/.bash_completions/typer.sh # Use bash-completion, if available [[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \ source /usr/share/bash-completion/bash_completion + +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_completion + +# Sets Up Node Version Manager +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm diff --git a/updates.txt b/updates.txt index 03c0864c..21b58192 100644 --- a/updates.txt +++ b/updates.txt @@ -14,7 +14,9 @@ add notation about using pick to parse through output, and pipe that using xargs example: ls | pick | xargs bat # will give you a choice of the files from ls, pick displays a menu to "pick" the file, which then is parsed to xargs bat (invokes bat on choice from ls | pick) -Install arandr (tool for multi-monitor setup, you'll need this eventually). +Install nvm -doas pacman -S arandr +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash + +and copy the zshrc and bashrc files which create the environment variable for nvm diff --git a/zshrc.txt b/zshrc.txt index d75ed453..1a9282b0 100644 --- a/zshrc.txt +++ b/zshrc.txt @@ -134,3 +134,7 @@ alias home="xclear && cd /home/brian && clear && history -p && hash -r" source ~/.aliases # Plugins (that need to be at the end of the zshrc script) source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh + +# Sets Up Node Version Manager +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm