1
0
Fork 0
mirror of https://github.com/MillironX/dotfiles.git synced 2024-11-14 19:03:09 +00:00
dotfiles/dot_aliases.tmpl

33 lines
887 B
Cheetah
Raw Normal View History

2021-08-25 00:46:22 +00:00
# Context-sensitive aliases
{{- if lookPath "batcat" }}
alias bat=batcat
{{- end }}
{{- if or (lookPath "bat") (lookPath "batcat") }}
alias cat=bat
{{- end }}
{{- if lookPath "lsd" }}
alias ls=lsd
{{- end }}
2023-04-15 22:19:08 +00:00
{{- if and (lookPath "codium") (not (lookPath "code")) }}
alias code=codium
{{- end }}
2021-08-25 00:46:22 +00:00
2023-10-06 15:57:26 +00:00
# Platform-specific aliases
{{- if eq .chezmoi.os "darwin" }}
alias nproc='sysctl -n hw.logicalcpu'
{{- end }}
2021-08-25 00:46:22 +00:00
# Universal aliases
2021-08-25 00:48:06 +00:00
alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
2021-08-25 00:46:22 +00:00
alias please='sudo $(fc -ln -1)'
alias nrun='__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus="NVIDIA_only"'
2022-07-14 15:35:37 +00:00
alias grim='git rebase -i --autosquash $(git_main_branch)'
2022-07-14 15:36:39 +00:00
alias grid='git rebase -i --autosquash $(git_develop_branch)'
2023-04-15 22:09:08 +00:00
alias gpub='git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)'
2021-08-25 00:46:22 +00:00
# Alias-like functions
nd () {
mkdir "$1"
cd "$1"
}