-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc
89 lines (67 loc) · 2.39 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
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
89
# Initialize Completions
autoload -Uz compinit
compinit
# Setting the history
#set history size
export HISTSIZE=10000
#save history after logout
export SAVEHIST=10000
#history file
export HISTFILE=~/.zhistory
#append into history file
setopt INC_APPEND_HISTORY
#save only one command if 2 common are same and consistent
setopt HIST_IGNORE_DUPS
#add timestamp for each entry
setopt EXTENDED_HISTORY
alias history='history 1'
alias h=history
# triggers the list command after each change of directory
function chpwd() {
ls -a
}
export PATH="$HOME/bin:$PATH"
export PATH="$HOME/homebrew/bin:$PATH"
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export PATH="$HOME/homebrew/sbin:$PATH"
export PATH="/opt/homebrew/lib/ruby/gems/3.3.0/bin:$PATH"
export PATH="/opt/homebrew/bin/:$PATH"
export PATH="$HOME/go/bin:$PATH"
export HOMEBREW_CASK_OPTS="--appdir=~/Applications/ --caskroom=/usr/local/Caskroom"
#[ -f /opt/homebrew/etc/profile.d/autojump.sh ] && . /opt/homebrew/etc/profile.d/autojump.sh
#eval "$(starship init zsh)"
#eval "$(zoxide init zsh)"
# eval "$(fnm env --use-on-cd --shell fish)"
export PATH="$HOME/.tmux/plugins/tmuxifier/bin:$PATH"
export PATH="/Users/joelgrimberg/.local/share/nvim/mason/bin:$PATH"
#eval "$(tmuxifier init -)"
export BAT_THEME="Catppuccin Mocha"
export FZF_CTRL_R_OPTS="--preview 'echo {}'"
export FZF_CTRL_T_OPTS="--preview '[ -d {} ] && tree -C {} || bat --color=always --style=numbers {}'"
source <(fzf --zsh)
export EDITOR="nvim"
export SUDO_EDITOR="$EDITOR"
export STARSHIP_CONFIG=~/.config/starship/starship.toml
source $HOME/zsh-plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $HOME/zsh-plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/scripts/random.aliases.sh
source ~/scripts/git.aliases.sh
source ~/scripts/kubernetes.aliases.sh
# Setup completions
#autoload -Uz compinit
compinit -u
fpath=(~/.config/zsh/completions $fpath)
#if [[ ! $(tmux list-sessions) ]]; then
# tmux
#fi
bash ~/scripts/joelgrimberg.ascii.sh
# inside your .bashrc or .zshrc (on the server side) add:
# start tmux if we ssh into the box
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
tmux attach-session -t $USER || tmux new-session -s $USER
fi
# this will attach to an ongoing tmux session or start a new one
# the session name will be the name of the user ($USER)
export PATH="$HOME/.config/bin:$PATH"
exec fish
PATH=~/.console-ninja/.bin:$PATH