-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.fish
56 lines (48 loc) · 1.52 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
export fish_greeting="" # Silence welcome message
export EDITOR=nvim
if [ $TERM = "linux" ] # Asahi Linux TTY fixes
setfont /usr/share/consolefonts/Lat2-Terminus32x16.psf.gz # Make font bigger, it's unreadable by default
export TERM=xterm-256color # Pretty colors in TTY
sudo dumpkeys | sed s/Caps_Lock/Escape/ | sudo loadkeys # Rebind Caps Lock to escape
end
# aliases
if [ uname = "Darwin" ]
alias get="brew install"
alias search="brew search"
else if [ -f /etc/arch-release ]
alias get="sudo pacman -S"
alias search="pacman -Ss"
else if [ -f /etc/lsb-release ]
alias get="sudo apt install"
alias search="apt search"
else if [ -f /etc/alpine-release ]
alias get="apk add"
alias search="apk search"
else if [ uname = "FreeBSD" ]
alias get="sudo pkg install -y"
alias search="pkg search"
end
alias vim=nvim
alias cat=bat
alias k="kubectl"
alias kp="kubectl get pods -A"
alias gswitch="gcloud config configurations activate"
alias kc="kubectx"
# Replicate the behavior of `!!` in bash
function last_history_item
echo $history[1]
end
abbr -a !! --position anywhere --function last_history_item
# lookup various commands/syntax in a pinch
function cheat --description "help <field> <topic>"
set args (echo $argv[2..-1] | tr ' ' '+')
curl "cht.sh/$argv[1]/$args"
end
# update master and create a branch with value: $1
function gitissue
git reset --hard
git checkout master
git pull origin master
git branch $argv[1]
git checkout $argv[1]
end