Krolyxon
Commit 89074db

Branches

Refs →

dotfiles-x11.configshellaliasrc

40 lines · 1.2 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 hst="history 1 -1 | cut -c 8- | sort | uniq | fzf | tr -d '\n' | xclip -sel c" \
13
14# Verbosity and settings that you pretty much just always are going to want.
15alias \
16 cp="cp -iv" \
17 mv="mv -iv" \
18 rm="rm -vI" \
19 yt="yt-dlp --embed-metadata -i -o '%(title)s.%(ext)s' --external-downloader=aria2c" \
20 yta="yt -x -f bestaudio/best" \
21 ytbdl="yt-dlp -f bestvideo+bestaudio -o '%(title)s.%(ext)s' --external-downloader=aria2c" \
22 ytdl="yt-dlp -f best -o '%(title)s.%(ext)s' --external-downloader=aria2c"
23
24
25# Colorize commands when possible.
26alias \
27 grep="grep --color=auto" \
28 diff="diff --color=auto" \
29 ip="ip -color=auto"
30
31
32# git aliases
33alias \
34 ga='git add' \
35 gc='git commit' \
36 gp='git push'
37
38ec() {find ~/.config -type f | fzf | xargs -r $EDITOR ;}
39es() { cd ~/.local/bin; $EDITOR $(fzf) ;}
40ef() {fzf | xargs -r -I % $EDITOR % ;}