개발환경설정

설탕찍은사과·2023년 6월 1일
0

개발환경설정은 귀찮다.

그러나 누군가는 도움되길 바란다.

export ZSH=~/.oh-my-zsh

# theme
ZSH_THEME="ys"

# plugin
plugins=(git 
  zsh-completions 
  zsh-history-substring-search 
  zsh-syntax-highlighting 
  zsh-autosuggestions 
  autojump
  kubectl
  kubectx)

# source 
source $ZSH/oh-my-zsh.sh

# jenv
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"

# terraform
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /usr/local/bin/terraform terraform
# tfenv 
export TFENV_VERSION=$(tfenv --version)
export TF_VERSION=$(terraform --version)

tfv(){
  terraform validate -var-file=vars/$(terraform workspace show).tfvars
}

tfp(){
  terraform plan -var-file=vars/$(terraform workspace show).tfvars
}

tfa(){
  terraform apply -var-file=vars/$(terraform workspace show).tfvars
}

tfc(){
  terraform console -var-file=vars/$(terraform workspace show).tfvars
}

# ruby init
[[ -d ~/.rbenv  ]] && \
  export PATH=${HOME}/.rbenv/bin:${PATH} && \
  eval "$(rbenv init -)"

# kubectl auto completion
source <(kubectl completion zsh)

# kubectl - k alias
alias k=kubectl
compdef __start_kubectl k

# kube_ps1
source "$(brew --prefix)/opt/kube-ps1/share/kube-ps1.sh"
PS1='$(kube_ps1)'$PS1

# vi to vim
alias vi=vim

# alias to lsd
alias ls='lsd'
alias ll='ls -alhF'

# Terrafrom Alias
alias tf="terraform"
alias tfw="terraform workspace"
profile
귀찮아하지말고 계속 정리하고 공부하자

0개의 댓글