dotfiles/dot_config/bash/aliases

61 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2024-07-13 13:41:00 +03:00
#!/bin/bash
# Pretty colors!
alias ls="ls --color=auto"
alias grep="grep --color=auto"
alias fgrep="fgrep --color=auto"
alias egrep="egrep --color=auto"
# Nyaliases for ls
if type exa 2>/dev/null >/dev/null; then
alias ls="exa"
alias ll="ls -alhF"
alias la="ls -A"
alias l="ls -F"
else
alias ll="ls -alhF"
alias la="ls -A"
alias l="ls -CF"
fi
# Coding stuff i guess
alias py="python3 -q"
alias edit="\$EDITOR"
alias :q="exit"
alias :e="edit"
command -v doas >/dev/null 2>&1 \
&& alias sudo="sfxc play windows/uac; sudo";
alias mypk="cat \${SSH_KEY_PATH}.pub"
alias termbin="nc termbin.com 9999"
alias myip="curl eth0.me"
# Media stuff
alias ffmpeg="ffmpeg -hide_banner"
alias ffplay="ffplay -hide_banner"
alias ffprobe="ffprobe -hide_banner"
if command -v yt-dlp >/dev/null 2>&1; then
alias ytdv="yt-dlp -f 'bestvideo[height=?720]'"
alias ytda="yt-dlp -f 'bestaudio[ext=mp3]/bestaudio' \
--add-metadata --embed-thumbnail --extract-audio \
--audio-format mp3 --retries infinite"
fi;
# Git stuff
alias ga="git add --verbose"
alias gaa="ga --all"
alias gc="git commit -v"
alias gca="gc -a"
alias gd="git diff"
alias gp="git push -v"
alias gpl="git pull"
alias glog="git log --stat"
alias glgp="glog -p"
alias glogg="glog --graph"
alias gst="git status"
alias uq='python3 -c '"'"'(lambda up, sys, json: json.dump(up.parse_qs(up.urlparse(sys.stdin.read()).query), sys.stdout))(__import__("urllib.parse").parse,__import__("sys"),__import__("json"))'"'"' | jq'
alias z='zoxide'