Created
April 23, 2020 07:19
-
-
Save renekreijveld/c3d907d655bd6545104f657e7f147686 to your computer and use it in GitHub Desktop.
Bash profile
This file contains 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
HOST_NAME=macmini | |
shopt -s autocd | |
shopt -s histappend | |
export PATH=$PATH:$HOME/bin | |
export HISTSIZE=5000 | |
export HISTFILESIZE=10000 | |
bind '"\e[A": history-search-backward' | |
bind '"\e[B": history-search-forward' | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
txtred='\e[0;31m' # Red | |
txtgrn='\e[0;32m' # Green | |
bldgrn='\e[1;32m' # Bold Green | |
bldpur='\e[1;35m' # Bold Purple | |
txtrst='\e[0m' # Text Reset | |
print_before_the_prompt () { | |
dir=$PWD | |
home=$HOME | |
dir=${dir/"$HOME"/"~"} | |
printf "\n$txtgrn%s: $bldgrn%s $txtrst\n" "$HOST_NAME" "$dir" | |
} | |
PROMPT_COMMAND=print_before_the_prompt | |
PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" | |
PS1="> " | |
function mkcd() | |
{ | |
mkdir $1 && cd $1 | |
} | |
# ------- | |
# Aliases | |
# ------- | |
alias a='code .' | |
alias c='code .' | |
alias l="ls" # List files in current directory | |
alias ll="ls -al" # List all files in current directory in long list format | |
alias o="open ." # Open the current directory in Finder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment