diff --git a/zsh/.zprofile b/zsh/.zprofile index 9debef3..33d3a19 100644 --- a/zsh/.zprofile +++ b/zsh/.zprofile @@ -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}" + diff --git a/zsh/.zshenv b/zsh/.zshenv index 6998cd0..17e0968 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -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) + diff --git a/zsh/.zshrc b/zsh/.zshrc index 0b815f2..6678705 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -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" diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index e7ed7e6..5a0629f 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -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" diff --git a/zsh/scripts.zsh b/zsh/scripts.zsh index 2a21fab..a127565 100644 --- a/zsh/scripts.zsh +++ b/zsh/scripts.zsh @@ -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