From 35184a8e416d56f88eeb74cc868e502c64dfe6c8 Mon Sep 17 00:00:00 2001 From: Wes Key <2540699+chopnico@users.noreply.github.com> Date: Tue, 14 Dec 2021 20:26:40 -0500 Subject: [PATCH] added goenv, tmux, and pyenv plugins. --- plugins/goenv/README.md | 3 +++ plugins/goenv/goenv.plugin.sh | 12 ++++++++++++ plugins/pyenv/README.md | 3 +++ plugins/pyenv/pyenv.plugin.sh | 8 ++++++++ plugins/tmux/README.md | 3 +++ plugins/tmux/tmux.plugin.sh | 3 +++ 6 files changed, 32 insertions(+) create mode 100644 plugins/goenv/README.md create mode 100644 plugins/goenv/goenv.plugin.sh create mode 100644 plugins/pyenv/README.md create mode 100644 plugins/pyenv/pyenv.plugin.sh create mode 100644 plugins/tmux/README.md create mode 100644 plugins/tmux/tmux.plugin.sh diff --git a/plugins/goenv/README.md b/plugins/goenv/README.md new file mode 100644 index 0000000..ba5828f --- /dev/null +++ b/plugins/goenv/README.md @@ -0,0 +1,3 @@ +# goenv plugin + +The goenv plugin will configure goenv paths and configure goenv to manage GOROOT and GOHOME. diff --git a/plugins/goenv/goenv.plugin.sh b/plugins/goenv/goenv.plugin.sh new file mode 100644 index 0000000..1444aed --- /dev/null +++ b/plugins/goenv/goenv.plugin.sh @@ -0,0 +1,12 @@ +# @chopnico 2021 + +# 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" diff --git a/plugins/pyenv/README.md b/plugins/pyenv/README.md new file mode 100644 index 0000000..ca11e5e --- /dev/null +++ b/plugins/pyenv/README.md @@ -0,0 +1,3 @@ +# pyenv plugin + +The pyenv plugin will configure pyenv paths. diff --git a/plugins/pyenv/pyenv.plugin.sh b/plugins/pyenv/pyenv.plugin.sh new file mode 100644 index 0000000..ee4e015 --- /dev/null +++ b/plugins/pyenv/pyenv.plugin.sh @@ -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 diff --git a/plugins/tmux/README.md b/plugins/tmux/README.md new file mode 100644 index 0000000..6454cfd --- /dev/null +++ b/plugins/tmux/README.md @@ -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. diff --git a/plugins/tmux/tmux.plugin.sh b/plugins/tmux/tmux.plugin.sh new file mode 100644 index 0000000..ed18bc6 --- /dev/null +++ b/plugins/tmux/tmux.plugin.sh @@ -0,0 +1,3 @@ +# @chopnico 2021 + +[ -z "$TMUX" ] && { tmux -2 -u attach || exec tmux -2 -u new-session && exit;}