Switch to zsh instead of bash
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
ca2c5b0c2b
commit
88927bbf39
13 changed files with 115 additions and 101 deletions
63
system/.config/zsh/.zshrc
Normal file
63
system/.config/zsh/.zshrc
Normal file
|
@ -0,0 +1,63 @@
|
|||
#!/bin/zsh
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# .zshrc
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin.kaderli@gmail.com>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# This script is called when you start a new shell.
|
||||
#
|
||||
# USAGE:
|
||||
# This script is automatically executed when you start a new shell.
|
||||
|
||||
# Zsh options
|
||||
setopt prompt_subst
|
||||
setopt extendedglob
|
||||
unsetopt correct
|
||||
|
||||
# Zsh keybindings
|
||||
bindkey "\e[H" beginning-of-line
|
||||
bindkey "\e[F" end-of-line
|
||||
bindkey "\e[5~" beginning-of-history
|
||||
bindkey "\e[6~" end-of-history
|
||||
bindkey "\e[3~" delete-char
|
||||
bindkey "\e[2~" quoted-insert
|
||||
bindkey "\e[5C" forward-word
|
||||
bindkey "\eOc" emacs-forward-word
|
||||
bindkey "\e[5D" backward-word
|
||||
bindkey "\eOd" emacs-backward-word
|
||||
bindkey "\ee[C" forward-word
|
||||
bindkey "\ee[D" backward-word
|
||||
bindkey "^H" backward-delete-word
|
||||
|
||||
# Enable autocompletion features
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
zstyle ':completion:*' menu select
|
||||
|
||||
# Persistent rehash
|
||||
zstyle ':completion:*' rehash true
|
||||
|
||||
# XDG_Base_Directories
|
||||
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||
export XDG_CACHE_HOME="${HOME}/.cache"
|
||||
export XDG_DATA_HOME="${HOME}/.local/share"
|
||||
export XDG_BIN_HOME="${HOME}/.local/bin"
|
||||
|
||||
# Sourcing environment variables
|
||||
if [ -f "${XDG_CONFIG_HOME}/custom/env" ]; then
|
||||
. "${XDG_CONFIG_HOME}/custom/env"
|
||||
fi
|
||||
|
||||
# Enable color support of ls
|
||||
if [ -f "${XDG_CONFIG_HOME}/custom/dircolors" ]; then
|
||||
dircolors -b "${XDG_CONFIG_HOME}/custom/dircolors" > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Sourcing alias definitions
|
||||
if [ -f "${XDG_CONFIG_HOME}/custom/aliases" ]; then
|
||||
. "${XDG_CONFIG_HOME}/custom/aliases"
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue