-
Notifications
You must be signed in to change notification settings - Fork 1
/
custom_aliases.fish
91 lines (69 loc) · 2.45 KB
/
custom_aliases.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
#!/usr/bin/env fish
#---------#
# General #
#---------#
abbr -a env 'env | sort' # sorted env
abbr -a grep 'grep -n' # always grep with line numbers
abbr -a sfind 'sudo find / -name' # find search entire filesystem
abbr -a pls 'sudo -E' # sudo with user's env vars
abbr -a howbig 'du -csh' # check a folder size
abbr -a res 'echo $status' # echo the last command's exit status
abbr -a upd 'sudo apt update -y && sudo apt full-upgrade -y'
#------------#
# Navigation #
#------------#
abbr -a ll 'ls -al1vF --color=auto'
abbr -a dev 'cd ~/dev'
abbr -a -- - 'cd -'
# abbr -a -- - 'cd $OLDPWD'
abbr -a .. 'cd ..'
abbr -a ... 'cd ../..'
abbr -a .... 'cd ../../..'
abbr -a ..... 'cd ../../../..'
abbr -a ...... 'cd ../../../../..'
#---------------------#
# Python/Poetry/Conda #
#---------------------#
abbr -a wpy 'which python'
abbr -a pyver 'python --version'
abbr -a cenv 'conda env list'
abbr -a cact 'conda activate'
abbr -a poetry-clear 'poetry cache clear _default_cache --all ;; poetry cache clear PyPI --all'
abbr -a jlab 'jupyter lab --no-browser' # start jupyter lab
#-----#
# Git #
#-----#
abbr -a gs 'git status'
abbr -a gss 'git status -sb'
abbr -a glog 'git log --oneline --graph --decorate --all'
abbr -a gsb 'git switch'
abbr -a gco 'git checkout'
abbr -a gpull 'git pull'
abbr -a gadd 'git add -A'
abbr -a gcam 'git commit -am'
abbr -a gba 'git branch -a'
abbr -a gbd 'git branch -d'
abbr -a gstash 'git stash'
abbr -a gspop 'git stash pop'
abbr -a gsl 'git stash list'
abbr -a grpo 'git remote prune origin'
#--------#
# Docker #
#--------#
abbr -a docker-cleanup 'docker rmi (docker images -f "dangling=true" -q)'
abbr -a docker-rm-containers 'docker rm (docker ps -a -q)'
# sudo docker rm -v $(sudo docker ps -a -q -f status=exited)
# sudo docker rmi -f $(sudo docker images -f "dangling=true" -q)
# docker volume ls -qf dangling=true | xargs -r docker volume rm
#-----#
# GCP #
#-----#
abbr -a gcssh 'gcloud compute ssh'
#------#
# Misc #
#------#
abbr -a install-rust "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
abbr -a vscode '/mnt/d/Programs/Google\ Drive/Apps/VSCode/bin/code'
abbr -a get-spotify-playlists 'cd ~/dev/spotipy-stuff ;; poetry -C ~/dev/DISCORD/compass-bot run python scripts/download_spotify_playlists.py -u oceanblocker ;; cd -'
abbr -a ssh-compass 'ssh root@$COMPASS_IP'
abbr -a update-compass 'cd ~/compass-bot/ ;; poetry run compass stop ;; git pull ;; poetry run compass -v start'