Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins: tmux, goenv, pyenv #266

Merged
merged 11 commits into from
Dec 24, 2021
3 changes: 3 additions & 0 deletions plugins/goenv/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# goenv plugin

The goenv plugin will configure goenv paths and configure goenv to manage GOROOT and GOHOME.
14 changes: 14 additions & 0 deletions plugins/goenv/goenv.plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# @chopnico 2021

if [ -d "$HOME/.goenv" ]; then
# goenv exported variables
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"

# Enables goenv shims
eval "$(goenv init -)"

# Allows goenv to manage GOPATH and GOROOT
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"
fi
3 changes: 3 additions & 0 deletions plugins/pyenv/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pyenv plugin

The pyenv plugin will configure pyenv paths.
8 changes: 8 additions & 0 deletions plugins/pyenv/pyenv.plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @chopnico 2021

if [ -d "$HOME/.pyenv" ]; then
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
fi
3 changes: 3 additions & 0 deletions plugins/tmux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# tmux plugin

The tmux plugin will either attach or create a new tmux session for each bash session. If a session already exists, it will simply attach.
3 changes: 3 additions & 0 deletions plugins/tmux/tmux.plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @chopnico 2021

[ -z "$TMUX" ] && { tmux -2 -u attach || exec tmux -2 -u new-session && exit;}
akinomyoga marked this conversation as resolved.
Show resolved Hide resolved