blob: d5f1e041807fbf14889ff2d1881b040ad66f355c (
plain) (
blame)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
|
autoload -Uz vcs_info
zstyle ":vcs_info:*" enable git svn
zstyle ':vcs_info:git:*' formats '%F{green}(%b)%f '
precmd() {
vcs_info
}
setopt prompt_subst
NEWLINE=$'\n'
PROMPT=' %2~ ${vcs_info_msg_0_}%# '
export HISTFILE=~/.zhistory
export HISTSIZE=100000
export SAVEHIST=100000
export EDITOR="nvim"
export BROWSER=
export PAGER="less"
export GPG_TTY=$(tty)
export SRC_DIR="$HOME/src"
export BIN_DIR="$SRC_DIR/bin"
export PATH="$BIN_DIR:$PATH"
export PATH="$HOME/.poetry/bin:$PATH"
export PATH="$GOPATH/bin:$PATH"
export PATH="$GOROOT/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export GOPATH="$SRC_DIR/go"
export GOBIN="$SRC_DIR/go/bin"
export PATH="$GOBIN:$PATH"
source "$HOME/.cargo/env"
export BAT_THEME="gruvbox-dark"
export FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --exclude .git"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
export LDFLAGS="-L/opt/homebrew/lib"
export CPPFLAGS="-I/opt/homebrew/include"
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"
alias gs="git status"
alias gc="git commit"
alias ga="git add"
alias gd="git diff"
alias gds="git diff --staged"
alias gp="git push"
alias gpo='git push origin'
alias gplrb='git pull --rebase'
alias gpl="git pull"
alias gl='git log'
alias gch="git checkout"
alias gcb='git checkout -b'
alias gv='git log --graph --decorate --oneline'
alias h="history 25"
alias j="jobs -l"
alias l="ls -alG"
alias vi="nvim"
alias vim="nvim"
alias vicfg="nvim ~/.config/nvim/init.lua"
alias python="python3"
# "Compile C Program"
#
# $1: Program Name
# $2: Output File (default: a.out)
# $3: C Standard (default: c11)
#
# Example: ccp main.c main c99
function ccp() {
local prog_name=${1:?"Please provide the path to the program to compile"}
local output_file=${2:-${prog_name:r}}
local std=${3:-c11}
gcc -Wall -W -pedantic -ansi -std=$std -o $output_file $prog_name
}
memcheck() {
G_DEBUG=always-malloc valgrind --tool=memcheck --leak-check=full --show-reachable=yes -s $1
}
gocover() {
t="/tmp/go-cover.$$.tmp"
go test -coverprofile=$t $@ && go tool cover -html=$t && unlink $t
}
# pnpm
export PNPM_HOME="/Users/eugene/Library/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
export CPPFLAGS="-I/usr/local/opt/readline/include"
export LDFLAGS="-L/usr/local/opt/readline/lib"
export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"
|