mirror of
https://github.com/kou029w/dotfiles.git
synced 2025-01-18 08:05:01 +00:00
add .zshrc
This commit is contained in:
parent
b82f68a44b
commit
adb3537c6e
3 changed files with 21 additions and 2 deletions
3
.bashrc
3
.bashrc
|
@ -5,8 +5,7 @@ HISTCONTROL=ignoreboth:erasedups
|
||||||
HISTFILESIZE=$((0x7fffffff))
|
HISTFILESIZE=$((0x7fffffff))
|
||||||
HISTSIZE=$((0x7fffffff))
|
HISTSIZE=$((0x7fffffff))
|
||||||
PROMPT_COMMAND='[[ $_PWD == $PWD ]] || { _PWD=$PWD; ls; }'
|
PROMPT_COMMAND='[[ $_PWD == $PWD ]] || { _PWD=$PWD; ls; }'
|
||||||
PS1=$PS1'\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
PS1=$PS1'\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(__git_ps1 "\[\033[32m\](%s)\[\033[00m\]")\n\$ '
|
||||||
PS1=${PS1%'\$ '}'$(__git_ps1 " \[\033[32m\](%s)\[\033[00m\]")\n\$ '
|
|
||||||
alias ..='cd ..'
|
alias ..='cd ..'
|
||||||
alias cp='cp --reflink=auto'
|
alias cp='cp --reflink=auto'
|
||||||
alias diff='diff --color=auto'
|
alias diff='diff --color=auto'
|
||||||
|
|
1
.zsh/functions/_git
Symbolic link
1
.zsh/functions/_git
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/Library/Developer/CommandLineTools/usr/share/git-core/git-completion.zsh
|
19
.zshrc
Normal file
19
.zshrc
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
. /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")
|
||||||
|
%# '
|
Loading…
Add table
Reference in a new issue