feat(zsh): various fixes

This commit is contained in:
Matej Janezic 2024-01-25 20:00:13 +01:00
parent 3fd73e311a
commit aeaedd8411
Signed by: janezicmatej
GPG Key ID: 4298E230ED37B2C0
5 changed files with 14 additions and 7 deletions

View File

@ -1 +1,2 @@
export PATH="/usr/local/bin:/opt/homebrew/bin:$Home/neovim/bin:${PATH}"
export PATH="/usr/local/bin:/opt/homebrew/bin:$HOME/neovim/bin:$HOME/bin:${PATH}"

View File

@ -37,3 +37,11 @@ command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
# poetry
export POETRY_HOME="$XDG_DATA_HOME/poetry"
command -v poetry >/dev/null || export PATH="$POETRY_HOME/bin:$PATH"
# gnupg
export GPG_TTY=$TTY
# aflabs
export USER_UID=$(id -u)
export USER_GID=$(id -g)

View File

@ -39,9 +39,6 @@ eval "$(pyenv virtualenv-init -)"
# ggman
eval "$(ggman shellrc)"
# gpg
export GPG_TTY=$(tty)
# custom functions and aliases
source "$ZDOTDIR/aliases.zsh"
source "$ZDOTDIR/scripts.zsh"

View File

@ -1,8 +1,9 @@
alias s="ssh"
alias z="exec zsh"
alias t="tmux a || tmux new-session -s janezicmatej -c ~"
alias t="tmux a || tmux new-session -s $(whoami) -c ~"
alias n=nvim_ve
# alias vim=nvim_ve
alias ssh-hosts="grep -P \"^Host ([^*]+)$\" $HOME/.ssh/config | sed 's/Host //'"
# navigation
alias cdgit="cd $GGROOT"

View File

@ -53,7 +53,7 @@ function pyinit {
DIRNAME=$(basename "$PWD")
if [[ $(pyenv versions | grep "$DIRNAME") ]]; then
if [[ $(pyenv versions | grep -E "/${DIRNAME}$") ]]; then
echo "found existing version with this name, setting..."
pyenv local "$DIRNAME"
return
@ -101,7 +101,7 @@ function get_dump {
return
fi
selected=$(ssh "$1" docker ps --filter image=postgres:* --format "{{.Names}}" | fzf)
selected=$(ssh "$1" docker ps --format "{{.Names}}" | fzf)
if [[ -z $selected ]]; then
return