From 255892797c9d907cd833558cd4d33e3e697999a0 Mon Sep 17 00:00:00 2001 From: Sebastian Cohnen Date: Thu, 10 Oct 2024 21:40:13 +0200 Subject: [PATCH] moves some things around --- etc/zshrc | 13 ++++--------- omz-custom/development.zsh | 17 ++++++++++------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/etc/zshrc b/etc/zshrc index 9706fc7..aeb4ca4 100644 --- a/etc/zshrc +++ b/etc/zshrc @@ -1,6 +1,6 @@ -# FIXME: Workaround for broken git info display -# See https://github.com/ohmyzsh/ohmyzsh/issues/12328 -zstyle ':omz:alpha:lib:git' async-prompt no +# NOTE: Workaround for broken async git promt display. +# See https://github.com/ohmyzsh/ohmyzsh/issues/12328 +zstyle ':omz:alpha:lib:git' async-prompt force export DOTFILES="$HOME/.dotfiles" @@ -113,12 +113,7 @@ else export EDITOR='subl -w' fi -# Prefixing prompt with profile when $AWS_VAULT is set -# TODO: How to move that into a better place? Like dev-related -if [[ -n $AWS_VAULT ]]; then - export PROMPT="[AWS@${AWS_VAULT}] ${PROMPT}" -fi - +# Load homebrew provided zsh completions if type brew &>/dev/null then FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" diff --git a/omz-custom/development.zsh b/omz-custom/development.zsh index f035032..ba47153 100644 --- a/omz-custom/development.zsh +++ b/omz-custom/development.zsh @@ -6,11 +6,10 @@ if [ -e "/Applications/Visual Studio Code.app" ]; then export PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin":$PATH fi -export PATH="$HOME/.local/bin":$PATH -export PATH="$HOME/.docker/bin":$PATH - -# Erlang -export ERL_AFLAGS="-kernel shell_history enabled" +# Prefixing prompt with profile when $AWS_VAULT is set +if [[ -n $AWS_VAULT ]]; then + export PROMPT="[AWS@${AWS_VAULT}] ${PROMPT}" +fi # Networking whoseport() { sudo lsof -i "TCP:$1" | grep LISTEN } @@ -22,10 +21,14 @@ command -v mcfly > /dev/null && { eval "$(mcfly init zsh)" } -gisw(){ - git branch --no-color --sort=-committerdate --format='%(refname:short)' | fzf --header 'git checkout' | xargs git checkout +# gpick shows a list of branches, sorted by last commit date, and checks out the selected branch +gpick(){ + git branch --no-color --sort=-committerdate --format='%(refname:short)' | fzf --header 'git switch' | xargs git switch } +# Erlang +export ERL_AFLAGS="-kernel shell_history enabled" + # Setup pyenv, if installed command -v pyenv > /dev/null && { export PYENV_ROOT="$HOME/.pyenv"