Created
December 18, 2025 10:45
-
-
Save ggrrll/79ef943ce1b658a3461f561897303a34 to your computer and use it in GitHub Desktop.
macos bash profile
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
| # suppress warining | |
| export BASH_SILENCE_DEPRECATION_WARNING=1 | |
| # # set PATH so it includes user's private bin if it exists | |
| if [ -d "$HOME/bin" ] ; then | |
| PATH="$HOME/bin:$PATH" | |
| fi | |
| # # don't put duplicate lines or lines starting with space in the history. | |
| # # See bash(1) for more options | |
| HISTCONTROL=ignoreboth | |
| # # append to the history file, don't overwrite it | |
| shopt -s histappend | |
| # # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
| HISTSIZE=1000 | |
| HISTFILESIZE=2000 | |
| # add colorful prompt with git branch at the end | |
| # Function to get current git branch | |
| parse_git_branch() { | |
| git branch 2>/dev/null | sed -n '/\* /s///p' | |
| } | |
| # Set colorful prompt with git branch | |
| if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
| # Color prompt: green user@host, blue path, yellow git branch | |
| PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[33m\]:$(parse_git_branch)\[\033[00m\]\$ ' | |
| else | |
| # Plain prompt with git branch | |
| PS1='\u@\h:\w$(parse_git_branch)\$ ' | |
| fi | |
| # # Alias definitions. | |
| # # You may want to put all your additions into a separate file like | |
| # # ~/.bash_aliases, instead of adding them here directly. This way, you | |
| # # can easily re-use your aliases in other bash configurations. | |
| if [ -f ~/.bash_aliases ]; then | |
| . ~/.bash_aliases | |
| fi | |
| # # fzf | |
| eval "$(fzf --bash)" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
...and few aliases like