Skip to content

Instantly share code, notes, and snippets.

@allyunion
Created June 7, 2024 15:53
Show Gist options
  • Save allyunion/b10675d67a1e4b064612880f052d3aa1 to your computer and use it in GitHub Desktop.
Save allyunion/b10675d67a1e4b064612880f052d3aa1 to your computer and use it in GitHub Desktop.
zprofile gist
function git_branch_name() {
branch=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/')
if [[ $branch != "" ]];
then
echo " $branch"
fi
}
#%n@%m %1~ %#
setopt prompt_subst
prompt='%n@%m %1~$(git_branch_name) %# '
# MacPorts Installer addition on 2024-05-14_at_10:56:32: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=1000000000
export SAVEHIST=1000000000
setopt EXTENDED_HISTORY
eval "$(/opt/homebrew/bin/brew shellenv)"
export OP_ACCOUNT="my.1password.com"
export PATH=$HOME/.composer/vendor/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment