dotfiles/lib/alias.zsh

59 lines
1.2 KiB
Bash
Raw Normal View History

2022-08-13 13:26:55 -05:00
#!/usr/bin/env zsh
2022-08-15 13:02:04 -05:00
alias aliases="alias | sed 's/=.*//'"
alias functions="declare -f | grep '^[a-z].* ()' | sed 's/{$//'"
alias paths='echo -e ${PATH//:/\\n}'
2021-12-08 09:38:24 -06:00
alias reload="source ~/.zshrc"
alias rr="rm -rf"
2022-08-15 13:02:04 -05:00
alias c="clear"
2021-12-08 09:38:24 -06:00
2022-08-15 13:02:04 -05:00
# ls -> lsd | swap ls for ls-deluxe if it exists
2021-12-08 09:38:24 -06:00
alias ls='ls --color=auto'
2022-08-15 13:02:04 -05:00
alias l='ls -lh'
alias la="ls -a"
alias ll="ls -lhA"
alias lr='ls -R'
alias lla="ls -la"
2021-12-08 09:38:24 -06:00
alias lsl="ls -lhFA | less"
2022-08-15 13:02:04 -05:00
alias left='ls -t -1'
2021-12-08 09:38:24 -06:00
if is-executable lsd; then
is-tty && alias lsd="lsd --icon never"
2022-06-04 11:46:08 -05:00
alias ls='lsd'
2021-12-08 09:38:24 -06:00
alias lt='lsd --tree --depth=3'
2022-08-15 13:02:04 -05:00
else
alias lt="tree -L 3"
2021-12-08 09:38:24 -06:00
fi
2022-08-15 13:02:04 -05:00
2021-12-08 09:38:24 -06:00
is-executable lazygit && alias lg=lazygit
2022-08-15 13:02:04 -05:00
2021-12-08 09:38:24 -06:00
# source custom tmux.conf with older tmux
alias tmux="tmux -f ~/.config/tmux/tmux.conf"
alias rc="rclone --filter-from ~/.config/rclone/filter-file.txt"
2022-08-15 13:02:04 -05:00
# prefer lvim > nvim > vim
2022-08-04 00:26:32 -05:00
if is-executable lvim; then
2022-08-05 11:56:55 -05:00
alias vim=lvim
2022-08-04 00:26:32 -05:00
elif is-executable nvim; then
2022-08-05 11:56:55 -05:00
alias vim=nvim
2022-08-04 00:26:32 -05:00
fi
2022-08-15 13:02:04 -05:00
2021-12-08 09:38:24 -06:00
is-executable gdu && alias gdu -I '.*node_modules' -H
2022-08-15 13:02:04 -05:00
2021-12-08 09:38:24 -06:00
alias fzf-bat="fzf --preview 'bat --style=numbers --color=always --line-range :500 {}'"
2022-01-04 10:42:33 -06:00
alias vivaldi="vivaldi-stable"
2022-08-15 13:02:04 -05:00
2022-01-18 15:54:21 -06:00
if is-executable zellij; then
2022-01-18 12:27:18 -06:00
2022-01-18 12:29:42 -06:00
alias zs="zellij -s"
alias zl="zellij ls"
alias za="zellij a"
2022-01-18 15:54:21 -06:00
2022-01-18 12:27:18 -06:00
fi
2022-08-15 13:02:04 -05:00
2022-03-02 12:56:40 -06:00
alias zenith="zenith -d 0 -n 0"
2022-08-15 13:02:04 -05:00
2022-06-28 11:40:20 -05:00
alias pdm-start='eval "$(pdm shell)"'
2022-08-15 13:02:04 -05:00