Moving files from old zsh-shell repo in here
This commit is contained in:
commit
bf3f685e3b
7
README.MD
Normal file
7
README.MD
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
This is just a nice little zsh conf file with a homemade prompt
|
||||||
|
|
||||||
|
To use this config, copy zshrc to ~/.zshrc and create ~/.zsh_history
|
||||||
|
|
||||||
|
You need to have zsh, zsh-syntax-highlighting and git installed
|
||||||
|
|
||||||
|
GLHF
|
34
zshrc
Normal file
34
zshrc
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
HISTFILE="$HOME/.zsh_history"
|
||||||
|
HISTSIZE=10000000
|
||||||
|
SAVEHIST=10000000
|
||||||
|
|
||||||
|
autoload -U compinit promptinit
|
||||||
|
|
||||||
|
promptinit
|
||||||
|
|
||||||
|
compinit
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
|
||||||
|
fpath=(/usr/local/share/zsh-completions $fpath)
|
||||||
|
|
||||||
|
function git_branch_name()
|
||||||
|
{
|
||||||
|
branch=$(git symbolic-ref HEAD 2> /dev/null | awk 'BEGIN{FS="/"} {print $NF}')
|
||||||
|
if [[ $branch == "" ]];
|
||||||
|
then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo '('$branch')'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# Enable substitution in the prompt.
|
||||||
|
setopt prompt_subst
|
||||||
|
|
||||||
|
PROMPT='%F{051}%n%f %F{120}%~%f %F{050}$(git_branch_name)%f %F{120}=>%f '
|
||||||
|
|
||||||
|
bindkey "^[[1;5C" forward-word
|
||||||
|
bindkey "^[[1;5D" backward-word
|
||||||
|
bindkey '\e[1~' beginning-of-line
|
||||||
|
bindkey '\e[4~' end-of-line
|
||||||
|
bindkey '\e[3~' delete-char
|
||||||
|
|
||||||
|
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
Loading…
x
Reference in New Issue
Block a user