summaryrefslogtreecommitdiff
path: root/.config/shell/aliasrc
blob: 066286ae345349f89472ca2fe1565f0069497fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

# Use neovim for vim if present
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"

alias \
    ls='ls -hN --group-directories-first --color=auto' \
    lsa='ls -lahN --group-directories-first --color=auto' \
    dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' \
    lf="lfub" \
    nb="newsboat" \

# Verbosity and settings that you pretty much just always are going to want.
alias \
        cp="cp -iv" \
        mv="mv -iv" \
        rm="rm -vI" \
        yt='yt-dlp --embed-metadata -i' \
        yta='yt -x -f bestaudio/best' \


# Colorize commands when possible.
alias \
	grep="grep --color=auto" \
	diff="diff --color=auto" \
	ip="ip -color=auto"


# git aliases
alias \
      ga='git add'
      gc='git commit -sS'
      gp='git push'

ec() {find  ~/.config -type f | fzf | xargs -r $EDITOR ;}
se() { cd ~/.local/bin; $EDITOR $(fzf) ;}
ef() {fzf | xargs -r -I % $EDITOR % ;}