| 1 | #!/bin/sh |
| 2 | |
| 3 | # Use neovim for vim if present |
| 4 | [ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d" |
| 5 | |
| 6 | alias \ |
| 7 | zconf='nvim ~/.config/zsh/.zshrc' \ |
| 8 | ls='exa -a --group-directories-first --icons' \ |
| 9 | lsa='exa -la --group-directories-first --icons' \ |
| 10 | ytdl='yt-dlp' \ |
| 11 | ytdlv='yt-dlp -f "(mp4)"' \ |
| 12 | ytdlm='yt-dlp -f "(mp3)"' \ |
| 13 | cl='clear' \ |
| 14 | dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' \ |
| 15 | lf="lfub" \ |
| 16 | hst='history 1 -1 | cut -c 8- | sort | uniq | fzf | tr -d '\n' | xclip -sel c' |
| 17 | |
| 18 | # Verbosity and settings that you pretty much just always are going to want. |
| 19 | alias \ |
| 20 | cp="cp -iv" \ |
| 21 | mv="mv -iv" \ |
| 22 | rm="rm -vI" \ |
| 23 | |
| 24 | # Colorize commands when possible. |
| 25 | alias \ |
| 26 | grep="grep --color=auto" \ |
| 27 | diff="diff --color=auto" \ |
| 28 | ip="ip -color=auto" |
| 29 | |
| 30 | ec() {find ~/.config -type f | fzf | xargs -r $EDITOR ;} |
| 31 | es() {find ~/.local/bin -type f | fzf | xargs -r $EDITOR ;} |
| 32 | ef() {fzf | xargs -r -I % $EDITOR % ;} |