2020-08-09 22:59:14 +00:00
|
|
|
function define_aliases -a uname -d 'Defines aliases for commonly used commands'
|
2022-03-09 21:29:18 +00:00
|
|
|
alias q 'exit'
|
2020-10-31 22:13:25 +00:00
|
|
|
alias rcp 'rsync -aP'
|
2020-08-09 22:59:14 +00:00
|
|
|
alias vg 'vagrant'
|
|
|
|
alias tf 'terraform'
|
2021-12-16 21:51:31 +00:00
|
|
|
alias gco 'gcloud compute'
|
2020-08-09 22:59:14 +00:00
|
|
|
alias tocb 'xclip -in -selection clipboard'
|
|
|
|
alias fromcb 'xclip -out -selection clipboard'
|
2020-10-31 22:13:25 +00:00
|
|
|
alias ssh-rm 'ssh-keygen -f ~/.ssh/known_hosts -R'
|
|
|
|
alias age-p 'age --armor --passphrase'
|
|
|
|
alias age-d 'age --decrypt --identity ~/.secrets/id_ed25519'
|
|
|
|
alias age-e 'age --armor --recipient (cat ~/.secrets/id_ed25519.pub)'
|
|
|
|
alias age-k 'age --decrypt --identity ~/.secrets/id_ed25519 ~/.secrets/age_keys.age'
|
2020-08-09 22:59:14 +00:00
|
|
|
|
|
|
|
switch "$uname"
|
|
|
|
case 'Linux'
|
2020-10-31 22:13:25 +00:00
|
|
|
alias goland 'command goland'
|
|
|
|
alias rider 'command rider'
|
2020-08-09 22:59:14 +00:00
|
|
|
alias webstorm 'command webstorm'
|
2020-10-31 22:13:25 +00:00
|
|
|
alias sctl 'sudo systemctl'
|
2021-01-19 05:41:16 +00:00
|
|
|
alias uctl 'systemctl --user'
|
2021-03-11 23:31:46 +00:00
|
|
|
alias bctl 'bluetoothctl'
|
2020-08-09 22:59:14 +00:00
|
|
|
case 'Darwin'
|
2020-10-31 22:13:25 +00:00
|
|
|
alias goland 'open -a Goland'
|
|
|
|
alias rider 'open -a Rider'
|
2020-08-09 22:59:14 +00:00
|
|
|
alias webstorm 'open -a Webstorm'
|
2021-02-01 00:36:23 +00:00
|
|
|
|
2021-12-13 05:16:38 +00:00
|
|
|
alias pkm 'brew search'
|
|
|
|
alias pkmi 'brew install'
|
|
|
|
alias pkmf 'brew update'
|
|
|
|
alias pkmu 'brew upgrade'
|
|
|
|
alias pkmr 'brew uninstall'
|
2020-08-09 22:59:14 +00:00
|
|
|
end
|
2021-01-19 05:41:16 +00:00
|
|
|
|
|
|
|
# Linux distro specific aliases below
|
|
|
|
|
2022-01-23 18:05:31 +00:00
|
|
|
#set -l distro
|
2021-01-19 05:41:16 +00:00
|
|
|
|
2022-01-23 18:05:31 +00:00
|
|
|
#for line in (cat /etc/os-release)
|
|
|
|
# set -l items (string split --max 1 '=' $line)
|
2021-01-19 05:41:16 +00:00
|
|
|
|
2022-01-23 18:05:31 +00:00
|
|
|
# if test $items[1] = 'ID'
|
|
|
|
# set distro $items[2]
|
|
|
|
# end
|
|
|
|
#end
|
2021-01-19 05:41:16 +00:00
|
|
|
|
2022-01-23 18:05:31 +00:00
|
|
|
#switch "$distro"
|
|
|
|
# case 'arch'
|
|
|
|
# case 'debian'
|
|
|
|
#end
|
2020-08-09 22:59:14 +00:00
|
|
|
end
|