-
Notifications
You must be signed in to change notification settings - Fork 3
/
dot_zshrc
59 lines (48 loc) · 2.02 KB
/
dot_zshrc
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Per function profiling
# zmodload zsh/zprof
# Per command profiling
# zmodload zsh/datetime
# setopt promptsubst
# PS4='+$EPOCHREALTIME %N:%i> '
# exec 3>&2 2>startlog.$$
# setopt xtrace prompt_subst
stty -ixon -ixoff # disable ctrl-s and ctrl-q
setopt EXTENDED_GLOB # Use extended globbing syntax.
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
setopt SHARE_HISTORY # Share history between session/terminals
setopt HIST_IGNORE_SPACE # Ignore commands starting with space
HISTFILE=~/.zhistory
HISTSIZE=50000
SAVEHIST=50000
source $HOME/.shell/bindings
source $HOME/.shell/completion
source $HOME/.shell/tools
if [[ "$OSTYPE" =~ "darwin" ]]; then
# when put in zshenv it gets overwritten by tmux which calls /etc/profile again (login shell)
# export PATH=$HOME/Library/Python/3.11/bin:/opt/homebrew/opt/gnu-tar/libexec/gnubin:/opt/homebrew/opt/findutils/libexec/gnubin:/opt/homebrew/Cellar/coreutils/9.1/libexec/gnubin:/opt/homebrew/bin:/opt/homebrew/opt/mysql-client/bin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH
PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH"
PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
fi
trap_exit_tmux() {
# switch only when current session has only one window and one pane
if [ "$(tmux list-panes | wc -l)" -eq 1 ] && [ "$(tmux list-windows | wc -l)" -eq 1 ]; then
tmux switch-client -t default
fi
}
if [[ $- == *i* ]]; then
# activate trap only when inside tmux and not inside Neovim terminal (in tmux)
if [[ $TERM_PROGRAM == "tmux" && -z $NVIM ]]; then
trap trap_exit_tmux EXIT
fi
fi
# zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'
# source <(carapace _carapace)
# Per-command profiling:
# unsetopt xtrace
# exec 2>&3 3>&-
# Per-function profiling
# zprof
# vim: filetype=sh