Created
February 16, 2024 21:03
-
-
Save flyptkarsh/0e845c821604a7b1ba9ce174e4aa7d81 to your computer and use it in GitHub Desktop.
zshrc Settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Function to parse the current Git branch | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p' | |
| } | |
| # Color definitions | |
| COLOR_DEF=$'%f' | |
| COLOR_USR=$'%F{243}' | |
| COLOR_DIR=$'%F{197}' | |
| COLOR_GIT=$'%F{39}' | |
| # Enable prompt substitution | |
| setopt PROMPT_SUBST | |
| # Set the prompt format | |
| export PROMPT='${COLOR_USR}%n ${COLOR_DIR}%~ ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF} $ ' | |
| # Aliases | |
| alias chrome='open -a "Google Chrome.app"' | |
| alias code='code-insiders' | |
| alias gplm='git pull origin main --ff' | |
| alias gplom='git pull origin main --ff' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment