Skip to content

Instantly share code, notes, and snippets.

@AeonFr
Last active December 15, 2021 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AeonFr/dc0bf00f80451fc3384f71b582ff5ae3 to your computer and use it in GitHub Desktop.
Save AeonFr/dc0bf00f80451fc3384f71b582ff5ae3 to your computer and use it in GitHub Desktop.
Some of my zsh config / aliases
export LANG=en_US.UTF-8
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/francisco/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"
plugins=(git zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
source /Users/francisco/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# alias cat='bat --style=plain'
alias ls='exa'
alias ll='exa -la --git'
alias ctags='`brew --prefix`/bin/ctags'
alias vim='nvim'
alias swchrome="open -a Google\ Chrome\ Beta --args --disable-web-security --ignore-certificate-errors --force-renderer-accessibility"
# Make a commit with a branchname prepended. Usage: gcbm "This is my message"
function gcbm() {
BRANCHNAME="$(git rev-parse --abbrev-ref HEAD | grep -o 'FI-[0-9]*')"
MESSAGE="${BRANCHNAME//} $1"
YELLOW='\033[1;33m'
GRAY='\033[1;30m'
BROWN='\033[0;33m'
NC='\033[0m' # No Color
echo "${GRAY}Commit message:${NC}"
echo "${GRAY}---------------${NC}"
echo "${YELLOW}${MESSAGE}${NC}"
echo "${GRAY}---------------${NC}"
git commit -m "$MESSAGE"
}
# Other settings
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='vim'
fi
# Disable some permission warning about insecure directories
ZSH_DISABLE_COMPFIX=true
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
HIST_STAMPS="yyyy/mm/dd"
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git '
# git breeze
[ -s "/Users/francisco/.scm_breeze/scm_breeze.sh" ] && source "/Users/francisco/.scm_breeze/scm_breeze.sh"
eval "$(starship init zsh)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment