1
0
Fork 0
mirror of https://github.com/kou029w/dotfiles.git synced 2025-01-18 16:07:59 +00:00
dotfiles/.zshrc
2023-08-08 21:51:52 +09:00

19 lines
644 B
Bash

. /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh
zstyle ':completion:*:*:git:*' script /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash
fpath=(~/.zsh/functions $fpath)
autoload -Uz compinit && compinit
alias ..='cd ..'
alias cp='cp --reflink=auto'
alias diff='diff --color=auto'
alias grep='grep --color=auto'
alias ll='ls -alF'
alias ls='ls --color=auto'
precmd() {
[[ "$TERM" == xterm-256color ]] && print -Pn -- '\e]2;%n@%m %~\a'
[[ "$_PWD" == "$PWD" ]] && return
_PWD="$PWD"
ls
}
setopt PROMPT_SUBST
PROMPT='%B%F{green}%n@%m%f%b:%B%F{blue}%~%f%b $(__git_ps1 "%%F{green}(%s)%%f")
%# '