-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.zshrc
More file actions
88 lines (68 loc) · 1.95 KB
/
.zshrc
File metadata and controls
88 lines (68 loc) · 1.95 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
if [[ -f /etc/zshrc ]]; then
source /etc/zshrc
fi
# bindkey "^[[H" beginning-of-line
# bindkey "^[[F" end-of-line
# Make ctrl+backpace and ctrl+delete work in zsh
# bindkey '^H' backward-kill-word
# bindkey '5~' kill-word
# bindkey "^[OH" beginning-of-line
# bindkey "^[OF" end-of-line
# bindkey "^[[1~" beginning-of-line
# bindkey "^[[4~" end-of-line
# shellcheck disable=SC2076
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
setopt rmstarsilent
# prevent bell
bindkey -e
# fix Alt + Left/Right on Linux
bindkey '^[[1;3C' forward-word
bindkey '^[[1;3D' backward-word
# # see: https://stackoverflow.com/questions/18600188/home-end-keys-do-not-work-in-tmux
# bindkey "^[OH" beginning-of-line
# bindkey "^[OF" end-of-line
# bindkey "^[[1~" beginning-of-line
# bindkey "^[[4~" end-of-line
#shellcheck disable=SC2190
# To have commands starting with `rm -rf` in red:
# https://stackoverflow.com/questions/6429515/stty-hupcl-ixon-ixoff
# Disable CTRL-Z
# if [[ -t 0 ]]; then
# stty -ixon -ixoff
# fi
# SEE https://github.com/catppuccin/fzf
# export FZF_DEFAULT_OPTS=" \
# --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
# --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
# --color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \
# --color=selected-bg:#45475a \
# --multi"
if [[ -d ~/.shellrc.d ]]; then
for rc in ~/.shellrc.d/*(DN); do
if [[ -f "$rc" ]]; then
# shellcheck disable=SC1090
. "$rc"
fi
done
fi
if [[ -d ~/.zshrc.d ]]; then
for rc in ~/.zshrc.d/*(DN); do
if [[ -f "$rc" ]]; then
# shellcheck disable=SC1090
. "$rc"
fi
done
fi
# SEE: https://discourse.nixos.org/t/nix-shell-does-not-use-my-users-shell-zsh/5588/12
nix() {
if [[ $1 == "develop" ]]; then
shift
command nix develop -c $SHELL "$@"
else
command nix "$@"
fi
}