Skip to content

Commit

Permalink
Moves from nodenv to asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
craveytrain committed Aug 1, 2022
1 parent eef390a commit 738bfc2
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 33 deletions.
5 changes: 3 additions & 2 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ alias reload!='. ~/.bashrc'
source "$HOME/.system/.environment.sh"
source "$HOME/.system/.aliases.sh"
source "$HOME/.system/.functions.sh"
source "$HOME/.system/.common.sh"

# auto cd into directories
shopt -s autocd
Expand All @@ -43,6 +44,6 @@ fi
source "./bash/prompt.bash"

# load nodenv
if hash nodenv 2>/dev/null; then
eval "$(nodenv init - --no-rehash bash)"
if hash asdf 2>/dev/null; then
source "$(brew --prefix asdf)/libexec/asdf.sh"
fi
3 changes: 0 additions & 3 deletions .system/.aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,3 @@ alias du='du -kh'

# shellcheck disable=SC2139
alias grep="${aliases[grep]:-grep} --color=auto"

# nodenv build definitions
export NODE_BUILD_DEFINITIONS="/usr/local/opt/node-build-update-defs/share/node-build"
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.7.0
61 changes: 36 additions & 25 deletions .zsh/prompt/p10k.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated by Powerlevel10k configuration wizard on 2021-10-13 at 15:59 CDT.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 54401.
# Generated by Powerlevel10k configuration wizard on 2022-08-01 at 16:37 CDT.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 8860.
# Wizard options: nerdfont-complete + powerline, large icons, unicode, lean, 2 lines,
# disconnected, no frame, sparse, many icons, concise, transient_prompt,
# instant_prompt=verbose.
Expand Down Expand Up @@ -51,13 +51,13 @@
background_jobs # presence of background jobs
direnv # direnv status (https://direnv.net/)
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
anaconda # conda environment (https://conda.io/)
pyenv # python environment (https://github.com/pyenv/pyenv)
goenv # go environment (https://github.com/syndbg/goenv)
nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
# virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
# anaconda # conda environment (https://conda.io/)
# pyenv # python environment (https://github.com/pyenv/pyenv)
# goenv # go environment (https://github.com/syndbg/goenv)
# nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
# nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
# nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
# node_version # node.js version
# go_version # go version (https://golang.org)
# rust_version # rustc version (https://www.rust-lang.org)
Expand All @@ -66,15 +66,16 @@
# laravel_version # laravel php framework version (https://laravel.com/)
# java_version # java version (https://www.java.com/)
# package # name@version from package.json (https://docs.npmjs.com/files/package.json)
rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
rvm # ruby version from rvm (https://rvm.io)
fvm # flutter version management (https://github.com/leoafarias/fvm)
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
jenv # java version from jenv (https://github.com/jenv/jenv)
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
haskell_stack # haskell version from stack (https://haskellstack.org/)
# rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
# rvm # ruby version from rvm (https://rvm.io)
# fvm # flutter version management (https://github.com/leoafarias/fvm)
# luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
# jenv # java version from jenv (https://github.com/jenv/jenv)
# plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
# perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
# phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
# scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
# haskell_stack # haskell version from stack (https://haskellstack.org/)
kubecontext # current kubernetes context (https://kubernetes.io/)
terraform # terraform workspace (https://www.terraform.io)
# terraform_version # terraform version (https://www.terraform.io)
Expand Down Expand Up @@ -1117,6 +1118,16 @@
# Custom icon.
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'

###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
# Perlbrew color.
typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
# Show perlbrew version only when in a perl project subdirectory.
typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
# Don't show "perl-" at the front.
typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
# Custom icon.
# typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'

############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
# PHP color.
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
Expand Down Expand Up @@ -1158,9 +1169,9 @@
# typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'

#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the the command you are typing invokes one of these tools.
# Show kubecontext only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern'
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold'

# Kubernetes context classes for the purpose of using different colors, icons and expansions with
# different contexts.
Expand Down Expand Up @@ -1284,7 +1295,7 @@
# typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'

#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
# Show aws only when the the command you are typing invokes one of these tools.
# Show aws only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show aws.
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'

Expand Down Expand Up @@ -1331,7 +1342,7 @@
# typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'

##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
# Show azure only when the the command you are typing invokes one of these tools.
# Show azure only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show azure.
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
# Azure account name color.
Expand All @@ -1340,9 +1351,9 @@
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'

##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
# Show gcloud only when the the command you are typing invokes one of these tools.
# Show gcloud only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show gcloud.
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
# Google cloud color.
typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32

Expand Down Expand Up @@ -1381,7 +1392,7 @@
# typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'

#[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
# Show google_app_cred only when the the command you are typing invokes one of these tools.
# Show google_app_cred only when the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show google_app_cred.
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'

Expand Down
6 changes: 3 additions & 3 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ plugins=(
zsh-prompt-benchmark
)

# load nodenv
if whence nodenv >/dev/null; then
eval "$(nodenv init - --no-rehash zsh)"
# load asdf
if whence asdf >/dev/null; then
source "$(brew --prefix asdf)/libexec/asdf.sh"
fi

0 comments on commit 738bfc2

Please sign in to comment.