From 3a15fb6cb3bb6e4bdd6fcc7c9091f9f36cf552ed Mon Sep 17 00:00:00 2001 From: James Walker Date: Sun, 21 Oct 2018 23:08:33 -0400 Subject: [PATCH] convert to asdf ! --- home/.Brewfile | 12 +-------- home/{.rbenv/default-gems => .default-gems} | 0 ...default-packages => .default-npm-packages} | 0 home/.mackup.cfg | 1 + home/.zsh/custom/walkah.zsh-theme | 6 ++++- home/.zshrc | 11 +++----- home/bin/goodmorning.sh | 25 +++---------------- 7 files changed, 15 insertions(+), 40 deletions(-) rename home/{.rbenv/default-gems => .default-gems} (100%) rename home/{.nodenv/default-packages => .default-npm-packages} (100%) diff --git a/home/.Brewfile b/home/.Brewfile index 0547bcd..94423f7 100644 --- a/home/.Brewfile +++ b/home/.Brewfile @@ -7,13 +7,11 @@ tap 'jawshooah/pyenv' tap 'nodenv/nodenv' cask 'java' # brews +brew 'asdf' brew 'autojump' brew 'awscli' -brew 'composer' brew 'dnsmasq' -brew 'elixir' brew 'exercism' -brew 'flake8' brew 'git' brew 'gsl' brew 'heroku' @@ -24,18 +22,10 @@ brew 'mas' brew 'mongodb' brew 'mr' brew 'mtr' -brew 'nodenv' -brew 'nodenv-default-packages' brew 'openssl' -brew 'php-code-sniffer' brew 'postgresql' brew 'pwgen' -brew 'pyenv' -brew "pyenv-default-packages", args: ["HEAD"] -brew 'rbenv' -brew 'rbenv-default-gems' brew 'reattach-to-user-namespace' -brew 'rust' brew 'ssh-copy-id' brew 'tmux' brew 'wget' diff --git a/home/.rbenv/default-gems b/home/.default-gems similarity index 100% rename from home/.rbenv/default-gems rename to home/.default-gems diff --git a/home/.nodenv/default-packages b/home/.default-npm-packages similarity index 100% rename from home/.nodenv/default-packages rename to home/.default-npm-packages diff --git a/home/.mackup.cfg b/home/.mackup.cfg index 2cac575..020b23a 100644 --- a/home/.mackup.cfg +++ b/home/.mackup.cfg @@ -4,6 +4,7 @@ engine = dropbox directory = Config [applications_to_sync] +asdf atom aws chef diff --git a/home/.zsh/custom/walkah.zsh-theme b/home/.zsh/custom/walkah.zsh-theme index e2aabf8..0d7408a 100644 --- a/home/.zsh/custom/walkah.zsh-theme +++ b/home/.zsh/custom/walkah.zsh-theme @@ -3,9 +3,13 @@ if [ -z $SSH_CONNECTION ]; then HCOLOR="green"; else HCOLOR="blue"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" +function asdf_prompt() { + echo $(asdf current $1|awk '{print $1}') +} + PROMPT='%{$fg[$HCOLOR]%}%m%{$reset_color%}:%c $(git_prompt_info)%{$fg[red]%}%(!.#.»)%{$reset_color%} ' PROMPT2='%{$fg[red]%}\ %{$reset_color%}' -RPS1='%{$fg[cyan]%}(%{$fg[red]%}$(ruby_prompt_info) %{$fg[green]%}$(nodenv_prompt_info) %{$fg[blue]%}$(pyenv_prompt_info)%{$fg[cyan]%}) %{$reset_color%}${return_code}' +RPS1='%{$fg[cyan]%}(%{$fg[red]%}$(asdf_prompt ruby) %{$fg[green]%}$(asdf_prompt nodejs) %{$fg[blue]%}$(asdf_prompt python)%{$fg[cyan]%}) %{$reset_color%}${return_code}' ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " diff --git a/home/.zshrc b/home/.zshrc index 4276b19..c4afc98 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -19,19 +19,16 @@ export ZSH_CUSTOM=$HOME/.zsh/custom # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Example format: plugins=(rails git textmate ruby lighthouse) -plugins=(autojump aws extract command-not-found tmux tmuxinator git github git-flow ssh-agent golang vagrant knife docker docker-compose mix mix-fast) +plugins=(asdf autojump aws extract command-not-found tmux tmuxinator git github git-flow ssh-agent golang vagrant knife docker docker-compose mix mix-fast) # ruby -plugins=($plugins ruby gem rbenv rails bundler heroku) -export RBENV_ROOT=$HOME/.rbenv +plugins=($plugins ruby gem rails bundler heroku) # node -plugins=($plugins nodenv npm yarn) -export NODENV_ROOT=$HOME/.nodenv +plugins=($plugins npm yarn) # python -plugins=($plugins pyenv pip) -export PYENV_ROOT=$HOME/.pyenv +plugins=($plugins pip) # php / drupal plugins=($plugins drush composer) diff --git a/home/bin/goodmorning.sh b/home/bin/goodmorning.sh index f29785d..63ffdad 100755 --- a/home/bin/goodmorning.sh +++ b/home/bin/goodmorning.sh @@ -15,27 +15,10 @@ brew bundle --global brew upgrade brew cleanup -# update ruby + gems -LATEST_RUBY=$(rbenv install -l | grep -v - | awk '{print $1}'| tail -1) -if [ $LATEST_RUBY != $(rbenv global) ]; then - rbenv install $LATEST_RUBY - rbenv global $LATEST_RUBY -fi -gem update - -# update latest node -LATEST_NODE=$(nodenv install -l |grep -v - |awk '{print $1}'|egrep '[0-9]+\.[0-9]+\.[0-9]+'|sort -V|tail -1) -if [ $LATEST_NODE != $(nodenv global) ]; then - nodenv install $LATEST_NODE - nodenv global $LATEST_NODE -fi - -# update python -LATEST_PYTHON=$(pyenv install -l | grep -v - | awk '{print $1}'|egrep '^2'| tail -1) -if [ $LATEST_PYTHON != $(pyenv global) ]; then - pyenv install $LATEST_PYTHON - pyenv global $LATEST_PYTHON -fi +# asdf +asdf update +asdf plugin-update --all +asdf install # update all repositories mr -j 5 update