zsh: add /etc/zsh config files for easier unpacking
This commit is contained in:
		
							
								
								
									
										14
									
								
								zsh-etcfiles/etc/zsh/zshenv
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								zsh-etcfiles/etc/zsh/zshenv
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
# /etc/zsh/zshenv
 | 
			
		||||
# zsh environment variables
 | 
			
		||||
export XDG_CACHE_HOME="$HOME/.cache"
 | 
			
		||||
export XDG_CONFIG_HOME="$HOME/.config"
 | 
			
		||||
export XDG_DATA_HOME="$HOME/.local/share"
 | 
			
		||||
export XDG_STATE_HOME="$HOME/.local/state"
 | 
			
		||||
 | 
			
		||||
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
 | 
			
		||||
 | 
			
		||||
# Shell settings
 | 
			
		||||
export HISTCONTROL="ignoredups"
 | 
			
		||||
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/zsh_history"
 | 
			
		||||
export HISTSIZE=20000
 | 
			
		||||
export SAVEHIST=20000
 | 
			
		||||
							
								
								
									
										18
									
								
								zsh-etcfiles/etc/zsh/zshrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								zsh-etcfiles/etc/zsh/zshrc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
# Zsh options for all users
 | 
			
		||||
 | 
			
		||||
# enable extended globbing
 | 
			
		||||
setopt extended_glob
 | 
			
		||||
 | 
			
		||||
# autoload misc files
 | 
			
		||||
for dotfile in "$ZDOTDIR"/*(D); do
 | 
			
		||||
    source $dotfile
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Check history file
 | 
			
		||||
if [[ ! -f "${HISTFILE}" ]]; then
 | 
			
		||||
    mkdir -p "${HISTFILE%/*}"
 | 
			
		||||
    touch "${HISTFILE}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# vim-like keybindings
 | 
			
		||||
bindkey -v
 | 
			
		||||
		Reference in New Issue
	
	Block a user