Skip to content

Instantly share code, notes, and snippets.

@miparnisari
Created October 5, 2021 22:41
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 miparnisari/5dcb8e88cfc5c272d9e1408c59c2cc3e to your computer and use it in GitHub Desktop.
Save miparnisari/5dcb8e88cfc5c272d9e1408c59c2cc3e to your computer and use it in GitHub Desktop.
# Have zsh return case-insensitive auto-complete matches, but prefer exact matches
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
autoload -Uz compinit && compinit
# git prompts with a branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
setopt PROMPT_SUBST
PROMPT='%9c%{%F{green}%}$(parse_git_branch)%{%F{none}%} $ '
# have files & directories printed in one line, with colors
alias ls='ls -1alG'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment