blob: 702bfd397d6e4c8cab6ef345c816d6ae944a6df3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# First and foremost, set up history
setopt inc_append_history # append to history as commands are run rather than at the end
setopt extended_history # record timestamp of command in HISTFILE
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds limits
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 execution
setopt share_history # share command history data
setopt hist_find_no_dups # filter out (even non-contiguous) entries when from history search
unsetopt flowcontrol # do not use ^S/^Q for flor control
export HISTFILE="${HOME}/.zsh_history"
export HISTSIZE=1000000
export SAVEHIST=1000000
# Common nice-to-haves
setopt auto_cd # Auto-cd into directory if only directory name used as command
setopt multios # Implicit cat/tee redirection
setopt prompt_subst # Prompt substitution used by themes
# Directory management
setopt auto_pushd # Treat cd as pushd
setopt pushd_minus # Flip cd +n and cd -n relative to csh
setopt pushd_silent # Do not print directories
setopt pushd_to_home # No arguments is the same as pushd $HOME - mimic cd with no args
setopt pushd_ignore_dups # Ignore pushd dupes
export DIRSTACKSIZE=16
# (Re)set locales, a reminder that we live in a world built upon bad decisions
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Pager - this requires an updated version of less on macOS or --mouse breaks
export LESS="--RAW-CONTROL-CHARS --chop-long-lines --mouse"
export PAGER="less"
# Add user's bin or .local/bin to PATH, if they exist
if [[ -d "${HOME}/bin" ]]; then
PATH="${HOME}/bin:${PATH}"
fi
if [[ -d "${HOME}/.local/bin" ]]; then
PATH="${HOME}/.local/bin:${PATH}"
fi
|