Fun with work-ish zsh stuff
This commit is contained in:
parent
f27cf30bd9
commit
946c21e03f
35
zshrc
35
zshrc
@ -42,14 +42,12 @@ fi
|
||||
|
||||
path=(
|
||||
$HOME/.rbenv/shims
|
||||
$HOME/.pyenv/shims
|
||||
$HOME/bin
|
||||
$HOME/go/bin
|
||||
$HOME/.local/bin
|
||||
$HOME/.cargo/bin
|
||||
$HOME/.rbenv/bin
|
||||
$HOME/.phpenv/bin
|
||||
$HOME/.pyenv/bin
|
||||
$HOME/.yarn/bin
|
||||
$HOME/.pulumi/bin
|
||||
${KREW_ROOT:-$HOME/.krew}/bin
|
||||
@ -97,7 +95,6 @@ plugins=(
|
||||
pip
|
||||
podman
|
||||
postgres
|
||||
pyenv
|
||||
python
|
||||
rails
|
||||
rake-fast
|
||||
@ -109,7 +106,6 @@ plugins=(
|
||||
symfony-complete
|
||||
tmux
|
||||
vagrant
|
||||
vault
|
||||
vi-mode
|
||||
yarn
|
||||
)
|
||||
@ -133,6 +129,8 @@ export EDITOR=vim
|
||||
export PYENV_ROOT="${HOME}/.pyenv"
|
||||
export SDKMAN_DIR="${HOME}/.sdkman"
|
||||
export VISUAL=vim
|
||||
export PTD_CACHE="${HOME}/.local/ptd"
|
||||
export PTD_ROOT="${HOME}/code/rstudio/ptd/infra"
|
||||
|
||||
# The completion for aws is not compatible with $fpath :scream_cat:
|
||||
if [[ -f /usr/local/share/zsh/site-functions/_aws ]] ; then
|
||||
@ -173,8 +171,14 @@ unsetopt correct_all
|
||||
bindkey '^R' history-incremental-search-backward
|
||||
|
||||
if which pyenv >/dev/null; then
|
||||
if [[ "${HATCH_ENV_ACTIVE}" ]]; then
|
||||
: skipping pyenv when inside a hatch env
|
||||
else
|
||||
path=($HOME/.pyenv/shims $HOME/.pyenv/bin "${path[@]}")
|
||||
plugins=("${plugins[@]}" pyenv)
|
||||
eval "$(pyenv init - 2>/dev/null)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if which phpenv >/dev/null; then
|
||||
eval "$(phpenv init - 2>/dev/null)"
|
||||
@ -226,6 +230,23 @@ function docker-cleanup() {
|
||||
done
|
||||
}
|
||||
|
||||
function ptd-completion() {
|
||||
if command -v ptd &>/dev/null; then
|
||||
eval "$(_PTD_COMPLETE=zsh_source ptd)"
|
||||
fi
|
||||
}
|
||||
|
||||
function mksecret() {
|
||||
local nbytes="${1:-42}"
|
||||
|
||||
python3 <<EOPYTHON | tr -d '/' | tr -d '+' | cut -b1-$((nbytes - 1))
|
||||
import secrets
|
||||
import base64
|
||||
|
||||
print(base64.b64encode(secrets.token_bytes(${nbytes} * 2)).decode(), end="")
|
||||
EOPYTHON
|
||||
}
|
||||
|
||||
export NVM_DIR="${HOME}/.nvm"
|
||||
|
||||
__maybesource ~/.zshenv
|
||||
@ -265,6 +286,12 @@ fi
|
||||
compdef _symfony_complete composer
|
||||
compdef _symfony_complete dep
|
||||
|
||||
alias fz=fuzzbucket-client
|
||||
|
||||
if ptd --version &>/dev/null; then
|
||||
ptd-completion
|
||||
fi
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user