Split zsh config

This commit is contained in:
madmaurice 2015-10-08 14:31:40 +02:00
parent 01980b8d34
commit 09e2e500ce
6 changed files with 21 additions and 50 deletions

4
zsh/.zsh/00-base.sh Normal file
View file

@ -0,0 +1,4 @@
# Lines configured by zsh-newuser-install
bindkey -e
export EDITOR="vim"

View file

@ -0,0 +1,5 @@
zstyle :compinstall filename '/home/madmaurice/.zshrc'
zstyle ':completion:*' menu select
autoload -Uz compinit
compinit

4
zsh/.zsh/02-prompt.zsh Normal file
View file

@ -0,0 +1,4 @@
autoload -U colors && colors
PROMPT="%{$fg[red]%}%n%{$fg[yellow]%}@%{$fg[green]%}%M%{$fg[yellow]%} > %{$reset_color%}"
RPROMPT="%{$fg[yellow]%}%~%{$reset_color%}"

4
zsh/.zsh/03-aliases.zsh Normal file
View file

@ -0,0 +1,4 @@
alias ls="ls --color=auto"
alias ll="ls -l"
alias la="ls -la"
alias emacs="vim"

View file

@ -1,50 +0,0 @@
# Lines configured by zsh-newuser-install
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/madmaurice/.zshrc'
zstyle ':completion:*' menu select
autoload -Uz compinit
compinit
autoload -U colors && colors
PROMPT="%{$fg[red]%}> %{$reset_color%}"
RPROMPT="%{$fg[red]%}%~%{$reset_color%}"
alias ls="ls --color=auto"
alias cd..="cd .."
alias ..="cd .."
alias disks="df -h"
alias space="du -shx"
alias emacs="vim"
alias gitlog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias sf="screenfetch"
catwhich() {
cat $(which $@)
}
runfor() {
while read line; do
$@ $line
done
}
mkpasswd() {
LEN=${1:-30}
base64 < /dev/urandom | fold -w $LEN | sed 1q
}
mkpasswd2() {
LEN=${1:-30}
tr -cd ' -~' < /dev/urandom | fold -w $LEN | sed 1q
}
export EDITOR="vim"
# Load any local only zshrc
[ -f "$HOME/.zshrc.local" ] && source "$HOME/.zshrc.local"
# End of lines added by compinstall

4
zsh/.zsh/10-helpers.zsh Normal file
View file

@ -0,0 +1,4 @@
mkpasswd() {
LEN=${1:-30}
tr -cd ' -~' < /dev/urandom | fold -w $LEN | sed 1q
}