| 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 | ls='ls -hN --group-directories-first --color=auto' \ |
| 8 | lsa='ls -lahN --group-directories-first --color=auto' \ |
| 9 | dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' \ |
| 10 | lf="lfub" \ |
| 11 | nb="newsboat" \ |
| 12 | |
| 13 | # Verbosity and settings that you pretty much just always are going to want. |
| 14 | alias \ |
| 15 | cp="cp -iv" \ |
| 16 | mv="mv -iv" \ |
| 17 | rm="rm -vI" \ |
| 18 | yt='yt-dlp --embed-metadata -i' \ |
| 19 | yta='yt -x -f bestaudio/best' \ |
| 20 | |
| 21 | |
| 22 | # Colorize commands when possible. |
| 23 | alias \ |
| 24 | grep="grep --color=auto" \ |
| 25 | diff="diff --color=auto" \ |
| 26 | ip="ip -color=auto" |
| 27 | |
| 28 | ec() {find ~/.config -type f | fzf | xargs -r $EDITOR ;} |
| 29 | se() { cd ~/.local/bin; $EDITOR $(fzf) ;} |
| 30 | ef() {fzf | xargs -r -I % $EDITOR % ;} |