Reformat aliases.zsh

This commit is contained in:
Sam A. 2023-04-19 20:25:09 +02:00
parent ff6def74c6
commit e0659f6925
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -11,7 +11,8 @@ alias -g .....="../../../.."
alias -g ......="../../../../.." alias -g ......="../../../../.."
# ls'ing # ls'ing
if (( ${+commands[exa]} )); then alias ls="ls --color=always"
(( ${+commands[exa]} )) && {
alias exa="exa -Fh --color=always --git --icons" alias exa="exa -Fh --color=always --git --icons"
alias la="exa -l" alias la="exa -l"
alias l="exa -al" alias l="exa -al"
@ -23,36 +24,42 @@ if (( ${+commands[exa]} )); then
alias tl="t -l" alias tl="t -l"
alias tla="tl -a" alias tla="tl -a"
alias tlaa="tla -g@" alias tlaa="tla -g@"
else }
alias l="ls -Ahl"
alias la="ls -hl"
alias ll="ls -aFhl"
alias t="tree -CI '.git|node_modules'"
alias ta="t -a"
fi
# Git # Git
(( ${+commands[git]} )) && {
alias gi="git init" alias gi="git init"
alias gsa="git submodule add" alias gsa="git submodule add"
alias gsur="git submodule update --remote" alias gsur="git submodule update --remote"
}
# Vagrant # Vagrant
(( ${+commands[vagrant]} )) && {
alias vagrant-scp="scp -F =(vagrant ssh-config) -i =(ssh-add -L)" alias vagrant-scp="scp -F =(vagrant ssh-config) -i =(ssh-add -L)"
alias vagrant-ssh="ssh -F =(vagrant ssh-config) -i =(ssh-add -L)" alias vagrant-ssh="ssh -F =(vagrant ssh-config) -i =(ssh-add -L)"
}
# Mounting # Filesystems
alias lsblk="lsblk -o name,mountpoint,size,label,uuid" alias lsblk="lsblk -o name,mountpoint,size,label,uuid"
(( ${+commands[udisksctl]} )) && {
alias lock="udisksctl lock -b" alias lock="udisksctl lock -b"
alias mount="udisksctl mount -b" alias mount="udisksctl mount -b"
alias unlock="udisksctl unlock -b" alias unlock="udisksctl unlock -b"
alias unmount="udisksctl unmount -b" alias unmount="udisksctl unmount -b"
}
# Searching # Searching
alias grep="grep --color=always" alias grep="grep --color=always"
alias zgrep="zgrep --color=always" alias zgrep="zgrep --color=always"
(( ${+commands[rg]} )) &&
alias rgh="rg --hidden -g '!/.git/'" alias rgh="rg --hidden -g '!/.git/'"
# Misc. # Misc.
alias cl="clear"
alias e="\$EDITOR"
alias se="sudoedit"
alias q="exit 0"
alias visudo="sudo EDITOR=\"rvim -nc 'set nobackup nowritebackup'\" visudo"
(( ${+commands[tmux]} )) && (( ${+commands[tmux]} )) &&
alias tmux="tmux -2u" alias tmux="tmux -2u"
(( ${+commands[dotnet]} )) && (( ${+commands[dotnet]} )) &&
@ -62,12 +69,6 @@ alias rgh="rg --hidden -g '!/.git/'"
alias less="bat -p --paging=always" alias less="bat -p --paging=always"
alias nless="bat --paging=always" alias nless="bat --paging=always"
} }
alias cl="clear"
alias e="$EDITOR"
alias se="sudoedit"
alias ls="ls --color=always"
alias q="exit 0"
alias visudo="sudo EDITOR=\"rvim -nc 'set nobackup nowritebackup'\" visudo"
# Platform specific # Platform specific
if [[ $(. /etc/os-release && echo $ID) == "artix" ]]; then if [[ $(. /etc/os-release && echo $ID) == "artix" ]]; then