-
Notifications
You must be signed in to change notification settings - Fork 9
/
.aliases
49 lines (36 loc) · 1.09 KB
/
.aliases
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
# vi: ft=sh
# This file is sourced by .shrc
# Update packages
alias update='doas apk upgrade -Uai'
alias sw='dbus-launch startw'
alias sx='startx'
alias :q='exit'
alias :wq='exit'
alias :e='${EDITOR:-vi} '
h() { { "$@" --help || "$@" -h ; } 2>&1 | less ; }
alias :h='h'
alias :help='h'
alias e='exec '
# Interactive mode
alias cp='cp -i'
alias mv='mv -i'
# Colors/human-readable
alias df='df -h'
alias du='du -h'
alias diff='diff --color=always'
alias ls='ls -h --color=always'
alias bc='bc -l'
if ls --version 2>&1 | grep -q GNU; then
alias dmesg='dmesg -H'
fi
alias net='ping 8.8.8.8'
alias todo='${EDITOR:-vi} ~/TODO'
bt() { (umask 027; aria2c --conf-path="$HOME"/.aria2bt "$@"); }
# man-ly info (Also maybe consider info --vi-keys instead of this trick)
info() { env info --subnodes "$1" | ${PAGER:-less}; }
# The POSIX Programmer's Manual uses Unicode minus signs (U+2212)
# instead of the hyphen-minus (U+002D), which can make searching for
# options difficult.
man() { env man "$@" | sed s/−/-/g | ${MANPAGER:-${PAGER:-less}}; }
# brainless file search
search() { find "${2:-.}" -iname "*${1}*"; }