blob: 5ea253da222bfafe29769571b7ff49ca5de1262c (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Bash aliases.
#
# Aliases are recursive (I.e., an alias inside an alias works).
# Shortcuts
# ======================================================================
alias e="$EDITOR"
alias aliases="$EDITOR ~/.bash_aliases && source ~/.bash_aliases"
# wtf error with Code-OSS
# Ref.: https://stackoverflow.com/a/73317738/7498073
alias code="code --enable-proposed-api ms-toolsai.jupyter"
alias echopath='echo "$PATH" | tr ":" "\n"'
# Common program's options
# ======================================================================
# coretools
alias diff2='diff --color=always -ys' # side by side, tell if file identical
alias diff='diff --color=always'
alias dir='dir --color=auto'
alias grep='grep --color=auto -i' # color case-insensitive
# Sort files by ASCII value (override current locale)
alias ls='ls --color=auto --group-directories-first --classify'
alias la='ls -A'
alias ll='ls -l -h'
alias lla='ll -A'
alias ip='ip --color=auto'
alias gcc='gcc -g -std=c99 -lm'
alias ed='ed -p "* "'
# https://missing.csail.mit.edu/2020/version-control/
alias gitlogpretty='git log --all --graph --decorate --abbrev-commit'
# https://stackoverflow.com/a/15606995/7498073
alias gitshowtrackedfiles='git ls-tree -r master --name-only'
# Precautionary
alias rm='rm -I' # Promt before removing more than 3 files
alias mv='mv -i' # Promt before overwrite
alias cp='cp -i' # same
#alias sqlite3='sqlite3 --safe' # Disables some really cool dot-commands
# Other program's options
# ======================================================================
alias units='units --verbose'
alias tty-clock='tty-clock -cs'
# Quick tools
alias pdfreduce='gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook'
alias youtube-dl_info='youtube-dl --get-filename --get-format --get-duration --get-description'
alias youtube-dl_fast='youtube-dl --format "best[height<=720][fps<=?30]" -o '\''%(title)s.%(ext)s'\'
alias mpv_webcam='mpv av://v4l2:/dev/video0' # retrived from the Archwiki
alias mpv_nhk_720p='mpv "https://nhkwlive-ojp.akamaized.net/hls/live/2003459/nhkwlive-ojp-en/index_4M.m3u8"'
# Cosmetic
# ======================================================================
alias :q="cowsay -d \"this isn't Vim\""
alias :w="cowsay -b \"this isn't Vim\""
alias sl="sl -de -5"
|