forked from tanmdoan/dotfiles-v2
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.zshrc
More file actions
97 lines (74 loc) · 2.41 KB
/
Copy path.zshrc
File metadata and controls
97 lines (74 loc) · 2.41 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
89
90
91
92
93
94
95
96
97
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# zsh
export ZSH=$HOME/.oh-my-zsh
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
HYPHEN_INSENSITIVE=true
COMPLETION_WAITING_DOTS=true
ZSH_DISABLE_COMPFIX=true
# make homebrew work
eval "$(/opt/homebrew/bin/brew shellenv)"
# plugins
plugins=(autojump macos tmux)
if [[ -f $ZSH/oh-my-zsh.sh ]]; then
source $ZSH/oh-my-zsh.sh
fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# terminal color settings
CLICOLOR=1
export EDITOR="nvim"
[[ $TMUX != "" ]] && export TERM="screen-256color"
# shell aliases
alias du="ncdu --color dark -rr -x --exclude .git --exclude node_modules"
alias e=$EDITOR
alias help='navi'
alias less="less -R"
alias lf="less +F"
# alias ll="ls -la"
# git aliases
alias gcl='git clean -f -d'
# shell functions
function move-last-download {
local download_dir="${HOME}/Downloads/"
local last_download="$(ls -t ${download_dir} | head -1)"
local destination_file="${PWD}/${1:-${last_download}}"
echo "MV: ${download_dir}${last_download}"
echo "TO: ${destination_file}"
mv "${download_dir}${last_download}" "${destination_file}"
}
function killports () {
for port in "$@"; do
pid=$(lsof -i tcp:$port -t)
if [[ $pid ]]; then
kill -9 $pid
echo "killed port: $port"
else
echo "No proccess matching port: $port"
fi
done
}
function mkcd {
mkdir -p "$1" && cd "$1"
}
# ruby
export ARCHFLAGS='-arch arm64'
export CC=gcc
alias be='bundle exec'
# import local zsh customizations, if present
zrcl="$HOME/.zshrc.local"
[[ ! -a $zrcl ]] || source $zrcl
# version management
eval "$(mise activate zsh)"
export PATH="$HOME/.local/bin:$PATH"
# secrets
[[ -f ~/.secrets ]] && source ~/.secrets
source "$HOME/.aliases"
source /opt/homebrew/share/powerlevel10k/powerlevel10k.zsh-theme
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Added by Windsurf
export PATH="/Users/andymention/.codeium/windsurf/bin:$PATH"