summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.bash_profile62
1 files changed, 29 insertions, 33 deletions
diff --git a/.bash_profile b/.bash_profile
index cef88f1..dfdd811 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -1,9 +1,9 @@
#!/bin/bash
# ==== Homebrew Apple M1/Intel fixing of $PATH
if [ -d /opt/homebrew ]; then
- eval "$(/opt/homebrew/bin/brew shellenv)"
+ eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -d /usr/local/Homebrew ]; then
- eval "$(/usr/local/Homebrew/bin/brew shellenv)"
+ eval "$(/usr/local/Homebrew/bin/brew shellenv)"
fi
export CLICOLOR=1
@@ -37,18 +37,18 @@ alias dirs="dirs -v"
alias srv="python3 -m http.server" # start simple server
alias tagme='ctags -R --languages=ruby --exclude=.git --exclude=log . $(bundle list --paths)'
alias gpgkill='(
- pkill pinentry-tty
- pkill pinentry-curses
- gpg-connect-agent killagent /bye
- gpg-connect-agent updatestartuptty /bye
- gpg-connect-agent /bye
+ pkill pinentry-tty
+ pkill pinentry-curses
+ gpg-connect-agent killagent /bye
+ gpg-connect-agent updatestartuptty /bye
+ gpg-connect-agent /bye
)'
alias cgit='docker run --name cgit -v $(pwd):/srv -p 1313:80 --rm -it cgit'
# ==== Functions
# get app ID to add to amethyst (example appid /Applications/Spotify.app/)
appid() {
- codesign -dr - "$@"
+ codesign -dr - "$@"
}
homebrew_token() {
@@ -71,39 +71,39 @@ fi
# ==== go config.
if command -v go 1>/dev/null 2>&1; then
- export PATH="$HOME/go/bin:$PATH"
+ export PATH="$HOME/go/bin:$PATH"
fi
# ==== rbenv config.
if command -v rbenv 1>/dev/null 2>&1; then
- export PATH="$HOME/.rbenv/bin:$PATH"
- eval "$(rbenv init -)"
+ export PATH="$HOME/.rbenv/bin:$PATH"
+ eval "$(rbenv init -)"
fi
# ==== NVM config
# shellcheck source=/dev/null
if [ -f "$HOME/.nvm/nvm.sh" ]; then
- export NVM_DIR=~/.nvm
- source "$HOME/.nvm/nvm.sh"
+ export NVM_DIR=~/.nvm
+ source "$HOME/.nvm/nvm.sh"
fi
# ==== Vault completeion
if command -v vault 1>/dev/null 2>&1; then
- complete -C "$(brew --prefix)/bin/vault" vault
+ complete -C "$(brew --prefix)/bin/vault" vault
fi
# ==== Generate helm autocomplete stuff when it's not there
if command -v helm 1>/dev/null 2>&1; then
- if [ ! -f "$(brew --prefix)/etc/bash_completion.d/helm" ]; then
- helm completion bash > "$(brew --prefix)/etc/bash_completion.d/helm"
- fi
+ if [ ! -f "$(brew --prefix)/etc/bash_completion.d/helm" ]; then
+ helm completion bash > "$(brew --prefix)/etc/bash_completion.d/helm"
+ fi
fi
# ==== Generate podman completion script when it's not there
if command -v podman 1>/dev/null 2>&1; then
- if [ ! -f "$(brew --prefix)/etc/bash_completion.d/podman" ]; then
- podman completion bash > "$(brew --prefix)/etc/bash_completion.d/podman"
- fi
+ if [ ! -f "$(brew --prefix)/etc/bash_completion.d/podman" ]; then
+ podman completion bash > "$(brew --prefix)/etc/bash_completion.d/podman"
+ fi
fi
# ==== k8s/ktx/kns completeion
@@ -123,31 +123,27 @@ fi
# ==== load all bash completions
if [ -f "$(brew --prefix)/etc/bash_completion" ]; then
- . "$(brew --prefix)/etc/bash_completion"
+ . "$(brew --prefix)/etc/bash_completion"
fi
# ==== MISC CowSay
# fortune | cowsay | lolcat
# ==== Work config ===========================================================
-
-# Use GNU tar if installed
-PATH="/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH"
-
# ==== JAVA config
if command -v java 1>/dev/null 2>&1; then
- export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH"
- export PATH="/opt/homebrew/opt/gradle@6/bin:$PATH"
+ export PATH="$(brew --prefix)/opt/openjdk@11/bin:$PATH"
+ export PATH="$(brew --prefix)/opt/gradle@6/bin:$PATH"
fi
# ==== JFrog CLI config
if command -v jf 1>/dev/null 2>&1; then
_jfrog() {
- local cur opts
- COMPREPLY=()
- cur="${COMP_WORDS[COMP_CWORD]}"
- opts=$( "${COMP_WORDS[@]:0:$COMP_CWORD}" --generate-bash-completion )
- mapfile -t COMPREPLY < <(compgen -W "${opts}" -- "${cur}")
+ local cur opts
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ opts=$( "${COMP_WORDS[@]:0:$COMP_CWORD}" --generate-bash-completion )
+ mapfile -t COMPREPLY < <(compgen -W "${opts}" -- "${cur}")
}
complete -F _jfrog -o default jfrog
complete -F _jfrog -o default jf
@@ -155,7 +151,7 @@ fi
# ==== CLang and Sphinx doc config
if command -v clang-format 1>/dev/null 2>&1; then
- export PATH="/opt/homebrew/opt/sphinx-doc/bin:$PATH"
+ export PATH="$(brew --prefix)/opt/sphinx-doc/bin:$PATH"
fi
alias assume=". assume"