From 1eb975686aa69efd2f48bcd879ee0a7eed7f70ea Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Thu, 10 Dec 2020 19:38:24 +0100 Subject: [PATCH] Clean bashrc --- .bashrc | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/.bashrc b/.bashrc index d6b0225..13e639a 100644 --- a/.bashrc +++ b/.bashrc @@ -36,10 +36,9 @@ export HISTSIZE=500000 MANWIDTH=120 export MANWIDTH -# Source fuzzy finder +# Fuzzy finder setup source /usr/share/fzf/*.bash source /usr/share/fzf/key-bindings.bash - export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -t -g ""' export FZF_DEFAULT_OPTS='--height 38% --reverse --border --prompt="❭ " --pointer="❭"' export FZF_COMPLETION_OPTS='-x' @@ -51,26 +50,10 @@ export EDITOR='vim' lazy_load_nvm() { unset -f nvm node npm npx 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 -} - -nvm() { - lazy_load_nvm - nvm $@ -} - -node() { - lazy_load_nvm - node $@ -} - -npm() { - lazy_load_nvm - npm $@ -} - -npx() { - lazy_load_nvm - npx $@ + [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" } +nvm() { lazy_load_nvm nvm $@; } +node() { lazy_load_nvm node $@; } +npm() { lazy_load_nvm npm $@; } +npx() { lazy_load_nvm npx $@; }