dotfiles/_cli/zsh/aliases.zsh

59 lines
1.5 KiB
Bash
Raw Normal View History

2022-06-27 10:47:21 +02:00
alias ga='git add .; git commit --no-edit --amend; git push --force-with-lease'
alias gae='git add .; git commit --amend; git push --force-with-lease'
2022-10-04 14:56:23 +02:00
alias less='less -R'
2023-10-14 23:26:39 +02:00
alias qt="dbus-run-session qtile start -b wayland"
2022-06-24 17:01:48 +02:00
2023-05-03 01:34:27 +02:00
if [[ $(command -v bat) ]]; then
alias cat='bat -pp --color=always --tabs=2 --theme=Monokai\ Extended\ Bright'
fi
2023-09-11 17:45:51 +02:00
if [[ $(command -v eza) ]]; then
alias ls='eza --git --octal-permissions --no-permissions --group-directories-first'
alias ll='eza --git --octal-permissions --no-permissions --group-directories-first -l'
2021-03-31 17:35:33 +02:00
else
case $(uname -s) in;
Darwin) alias ls='ls -G';;
Linux) alias ls='ls --color';;
esac
alias ll='ls -l'
fi
2023-05-03 01:34:27 +02:00
if [[ $(command -v fd) ]]; then
if [[ -f ~/.local/config/fd ]]; then
alias fd='fd -H -L --ignore-file ~/.local/config/fd'
else
alias fd='fd -H -L'
fi
fi
2023-05-03 01:34:27 +02:00
if [ $(command -v nvim) ]; then
export EDITOR=nvim
export MANPAGER="nvim +Man!"
alias vim=nvim
alias vimdiff="nvim -d"
elif [ $(command -v vim) ] ; then
export EDITOR=vim
else
export EDITOR=vi
fi
2023-05-03 01:34:27 +02:00
if [[ $(command -v rg) ]]; then
alias grep='rg -i'
else
alias grep='grep --color'
fi
2021-08-02 17:17:22 +02:00
2021-08-02 17:18:13 +02:00
function ud() {
2022-03-30 12:14:58 +02:00
wd dots && git pull
2023-10-14 23:54:36 +02:00
for i in $XDG_CONFIG_HOME/nvim ~/.local/git/zsh_modules/*; do sh -c "cd $i && git pull"; done
2024-03-08 15:42:43 +01:00
nvim -c "Lazy update"
2021-08-30 00:17:01 +02:00
rm -rf ~/go
2022-03-30 14:06:30 +02:00
cd
2021-08-02 17:17:22 +02:00
}
2022-03-30 12:14:58 +02:00
function upgrade() {
2023-05-07 15:29:23 +02:00
case $(lsb_release -si) in
2022-06-17 10:57:03 +02:00
Gentoo) eix-sync && eix-update && emerge -avuNDU @world ;;
2023-10-24 14:50:07 +02:00
VoidLinux) xbps-install -Su && xbps-remove -RoO && xlocate -S ;;
2022-03-30 12:14:58 +02:00
esac
}