-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.fish
121 lines (95 loc) · 2.62 KB
/
config.fish
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
111
112
113
114
115
116
117
118
119
120
121
set -gx EDITOR nvim
# set -gx TERM screen-256color
set -gx TERM tmux-256color
set -gx VOLTA_HOME $HOME/.volta
set -gx PATH $HOME/go/bin $PATH
set -gx PATH $HOME/adb-fastboot/platform-tools $PATH
set -gx PATH $HOME/.deno/bin $PATH
set -gx PATH $HOME/flutter/bin $PATH
set -gx PATH $HOME/.cargo/bin $PATH
set -gx PNPM_HOME "$HOME/Library/pnpm"
set -gx PATH "$PNPM_HOME" $PATH
set -gx PATH /Applications/Postgres.app/Contents/Versions/latest/bin $PATH
set -gx PATH $PATH $HOME/.krew/bin
set -gx PATH $PATH $VOLTA_HOME
set -gx XDG_CONFIG_HOME $HOME/.config
set -gx VOLTA_HOME "$HOME/.volta"
set -gx PATH "$VOLTA_HOME/bin" $PATH
set -gx ANDROID_SDK_ROOT "$HOME/Library/Android/sdk"
set -gx PATH "$ANDROID_SDK_ROOT/platform-tools" $PATH
set -gx PATH "$ANDROID_SDK_ROOT/emulator" $PATH
set -gx PATH "$HOME/.jenv/bin" $PATH
set -gx LC_ALL en_US.UTF-8
# Disable fish greeting
set -U fish_greeting
# tabtab source for packages
# uninstall by removing these lines
[ -f ~/.config/tabtab/__tabtab.fish ]; and . ~/.config/tabtab/__tabtab.fish; or true
# Direnv
direnv hook fish | source
# Starship
starship init fish | source
###### ALIAS ######
alias k='kubectl'
alias m='minikube'
alias s='serverless'
if type -q eza
alias ll "eza -l -g --icons"
alias lla "ll -a"
end
# Git
alias gs='git status'
alias gf='git fetch'
alias gl='git log'
alias ga='git add'
alias gc='git commit'
alias gp='git push'
alias gh='git checkout'
alias glo='git log --oneline'
alias gfa='git fetch --all'
alias gsi='git stash --include-untracked'
alias cl='clear'
###### ALIAS ######
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/thien/Downloads/google-cloud-sdk/path.fish.inc' ]; . '/Users/thien/Downloads/google-cloud-sdk/path.fish.inc'; end
###### FUNCTIONS ######
function qq
clear
set logpath "$TMPDIR/q"
if test -z "$TMPDIR"
set logpath "/tmp/q"
end
if test ! -f "$logpath"
echo 'Q LOG' > "$logpath"
end
tail -100f -- "$logpath"
end
function rmqq
set logpath "$TMPDIR/q"
if test -z "$TMPDIR"
set logpath "/tmp/q"
end
if test -f "$logpath"
rm "$logpath"
end
qq
end
function vim --wraps=nvim --description 'alias vim=nvim'
nvim $argv
end
function cat --wraps=bat --description 'alias cat=bat'
bat $argv
end
function gcam
git commit -am $argv
end
###### FUNCTIONS ######
# pyenv - Python version manager
pyenv init - | source
eval "$(/opt/homebrew/bin/brew shellenv)"
# sst
fish_add_path /Users/thien/.sst/bin
# rbenv - Ruby version manager
status --is-interactive; and rbenv init - fish | source
# jenv - Java version manager
status --is-interactive; and jenv init - | source