mirror of
https://github.com/MillironX/dotfiles.git
synced 2024-11-14 19:03:09 +00:00
32 lines
887 B
Cheetah
32 lines
887 B
Cheetah
# 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 }}
|
|
{{- if and (lookPath "codium") (not (lookPath "code")) }}
|
|
alias code=codium
|
|
{{- end }}
|
|
|
|
# Platform-specific aliases
|
|
{{- if eq .chezmoi.os "darwin" }}
|
|
alias nproc='sysctl -n hw.logicalcpu'
|
|
{{- end }}
|
|
|
|
# Universal aliases
|
|
alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
|
alias please='sudo $(fc -ln -1)'
|
|
alias nrun='__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus="NVIDIA_only"'
|
|
alias grim='git rebase -i --autosquash $(git_main_branch)'
|
|
alias grid='git rebase -i --autosquash $(git_develop_branch)'
|
|
alias gpub='git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)'
|
|
|
|
# Alias-like functions
|
|
nd () {
|
|
mkdir "$1"
|
|
cd "$1"
|
|
}
|