Krolyxon
Commit 44450d6

Branches

Refs →

dotfiles-x11.configshellaliasrc

39 lines · 1.1 KB · Bourne Again Shell (bash)

1#!/bin/sh
2
3# Use neovim for vim if present
4[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
5
6alias \
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.
14alias \
15 cp="cp -iv" \
16 mv="mv -iv" \
17 rm="rm -vI" \
18 yt="yt-dlp --embed-metadata -i -o '%(title)s.%(ext)s' --external-downloader=aria2c" \
19 yta="yt -x -f bestaudio/best" \
20 ytbdl="yt-dlp -f bestvideo+bestaudio -o '%(title)s.%(ext)s' --external-downloader=aria2c" \
21 ytdl="yt-dlp -f best -o '%(title)s.%(ext)s' --external-downloader=aria2c"
22
23
24# Colorize commands when possible.
25alias \
26 grep="grep --color=auto" \
27 diff="diff --color=auto" \
28 ip="ip -color=auto"
29
30
31# git aliases
32alias \
33 ga='git add' \
34 gc='git commit' \
35 gp='git push'
36
37ec() {find ~/.config -type f | fzf | xargs -r $EDITOR ;}
38se() { cd ~/.local/bin; $EDITOR $(fzf) ;}
39ef() {fzf | xargs -r -I % $EDITOR % ;}