Last active
May 5, 2021 10:40
-
-
Save CTimmerman/5690283e54ad99bf100704a24209435b to your computer and use it in GitHub Desktop.
CLI shell settings for Bourne (sh), Bash, Z (zsh), etc.. ~/.profile seems common to all.
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
# .profile is used by both Bash and Zsh, .bash_profile only by Bash, and .bashrc by Bash but not on MacOS (no colors, for one). | |
export PATH="$(brew --prefix homebrew/php/php71)/bin:$PATH" | |
export CLICOLOR=1 | |
export GREP_OPTIONS='--color=auto' | |
# Inherit prompt user@host:yellow path$ | |
export PROMPT=$'%n@%m:\e[33m%c\e[0m%# ' # Zsh | |
export PS1='\[\a\]\t \u@\h:\[\e[93m\]\w\[\e[0m\]\$ ' # Bash. Use .bashrc on Debian. | |
ssh-add ~/.ssh/id_ed25519 # For GitLab key in Debian. | |
# Zsh doesn't see these in MacOS Sierra | |
alias d='diff -Bwurx ".*"' | |
alias ls='ls --color=auto' | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias g='pcregrep -MHrn --color=auto' | |
mark(){ perl -pe 's/(.*ERR.*)/\x1b[93;41m$1\x1b[0m/i; s/(.*warn.*)/\x1b[93m$1\x1b[0m/i';} # less error.log |mark |
Author
CTimmerman
commented
Apr 28, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment