# Specify completion methods: first expand aliases, then complete commands zstyle':completion:*' completer _expand _complete
# Format the completion display with a message indicating what is being completed zstyle':completion:*' format 'Completing %d'
# Remove group names from completion listings zstyle':completion:*' group-name ''
# List prompt for showing how to navigate through completion options zstyle':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
# Select prompt for scrolling through completion menu zstyle':completion:*' select-prompt %SScrolling active: current selection at %p%s
# Disable the use of older `compctl` completions (use new style completion) zstyle':completion:*' use-compctl false
# Custom completion style for `kill` command, listing processes with detailed information zstyle':completion:*:kill:*'command'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
# Set colors for the `kill` command completion (red color for process IDs) zstyle':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
EDITOR=vim alias c='clear' alias nf='fastfetch' alias pf='fastfetch' alias ff='fastfetch' aliasls='eza -a --icons' alias ll='eza -al --icons' alias lt='eza -a --tree --level=1 --icons' alias shutdown='systemctl poweroff' alias v='$EDITOR' alias vim='$EDITOR' alias wifi='nmtui' alias Qtile='startx' alias gs="git status" alias ga="git add" alias gc="git commit -m" alias gp="git push" alias gpl="git pull" alias gst="git stash" alias gsp="git stash; git pull" alias gcheck="git checkout" alias gcredential="git config credential.helper store" alias update-grub='sudo grub-mkconfig -o /boot/grub/grub.cfg' alias res1='xrandr --output DisplayPort-0 --mode 2560x1440 --rate 165' alias res2='xrandr --output DisplayPort-0 --mode 1920x1080 --rate 165' alias setkb='setxkbmap de;echo "Keyboard set back to de."' aliascp="cp -i"# Confirm before overwriting something aliasdf='df -h'# Human-readable sizes alias free='free -m'# Show sizes in MB alias gitu='git add . && git commit && git push' aliashistory="history 0" alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias diff='diff --color=auto' aliasrm='rm -i' alias ip='ip --color=auto' alias la='ls -A'
setopt correct # Auto correct mistakes setopt extendedglob # Extended globbing. Allows using regular expressions with * setopt nocaseglob # Case insensitive globbing setopt rcexpandparam # Array expension with parameters setopt nocheckjobs # Don't warn about running processes when exiting setopt numericglobsort # Sort filenames numerically when it makes sense setopt nobeep # No beep setopt appendhistory # Immediately append history instead of overwriting setopt histignorealldups # If a new command is a duplicate, remove the older one setopt autocd # if only directory path is entered, cd there. setopt inc_append_history # save commands are added to the history immediately, otherwise only when shell exits. setopt histignorespace # Don't save commands that start with space setopt prompt_subst setopt interactivecomments # allow comments in interactive mode setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’ setopt nonomatch # hide error message if there is no match for the pattern setopt notify # report the status of background jobs immediately setopt numericglobsort # sort filenames numerically when it makes sense setopt promptsubst # enable command substitution in prompt setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space setopt hist_verify # show command with history expansion to user before running it #setopt share_history # share command history data
# Enable emacs key bindings bindkey -e
# Essential key bindings bindkey'^[[7~' beginning-of-line # Home key bindkey'^[[8~' end-of-line # End key bindkey'^[[2~' overwrite-mode # Insert key bindkey'^[[3~' delete-char # Delete key bindkey'^[[C' forward-char # Right arrow key bindkey'^[[D' backward-char # Left arrow key bindkey'^[[5~' history-beginning-search-backward # Page Up key bindkey'^[[6~' history-beginning-search-forward # Page Down key bindkey'^[[1;5C' forward-word # Ctrl + Right arrow (forward word) bindkey'^[[1;5D' backward-word # Ctrl + Left arrow (backward word)
# History search with up/down keys bindkey'^[[A' history-substring-search-up # Up arrow bindkey'^[[B' history-substring-search-down # Down arrow
# Use terminfo for portability (optional, for special cases) typeset -g -A key key[Home]="${terminfo[khome]}" key[End]="${terminfo[kend]}" key[Insert]="${terminfo[kich1]}" key[Delete]="${terminfo[kdch1]}" key[Up]="${terminfo[kcuu1]}" key[Down]="${terminfo[kcud1]}" key[Left]="${terminfo[kcub1]}" key[Right]="${terminfo[kcuf1]}" key[PageUp]="${terminfo[kpp]}" key[PageDown]="${terminfo[knp]}"
# Use lesspipe for better handling of non-text files [ -x /usr/bin/lesspipe ] && eval"$(SHELL=/bin/sh lesspipe)"
# Color man pages export LESS_TERMCAP_mb=$'\E[1;31m'# begin blink export LESS_TERMCAP_md=$'\E[1;36m'# begin bold export LESS_TERMCAP_me=$'\E[0m'# reset bold/blink export LESS_TERMCAP_so=$'\E[01;33m'# begin reverse video export LESS_TERMCAP_se=$'\E[0m'# reset reverse video export LESS_TERMCAP_us=$'\E[1;32m'# begin underline export LESS_TERMCAP_ue=$'\E[0m'# reset underline