-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
83 lines (58 loc) · 2.07 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls="ls --color=auto"
alias grep="grep --color=auto"
alias fgrep="fgrep --color=auto"
alias egrep="egrep --color=auto"
fi
#alias ll="ls -alF"
#alias la="ls -A"
#alias l="ls -CF"
# Requires "Color LS": https://github.com/athityakumar/colorls
# which, in turn, requires Ruby.
alias lc="colorls"
#alias l='lc -la --sd'
#alias ll='lc -l --sd'
#alias la='lc -lA --sd'
# This set assumes lsd is installed: https://github.com/Peltoche/lsd
alias ll='lsd -la --group-directories-first'
alias l='lsd -l --group-directories-first'
alias la='lsd -lA --group-directories-first'
# Docker aliases
alias dc='docker-compose'
# Use Laragon's PHP
#alias php='php.exe'
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
vdiff () {
if [ "${#}" -ne 2 ] ; then
echo "vdiff requires two arguments"
echo " comparing dirs: vdiff dir_a dir_b"
echo " comparing files: vdiff file_a file_b"
return 1
fi
local left="${1}"
local right="${2}"
if [ -d "${left}" ] && [ -d "${right}" ]; then
vim +"DirDiff ${left} ${right}"
else
vim -d "${left}" "${right}"
fi
}
dtags () {
local image="${1}"
wget -q https://registry.hub.docker.com/v1/repositories/"${image}"/tags -O - \
| tr -d '[]" ' | tr '}' '\n' | awk -F: '{print $3}'
}
alias dew="docker-compose exec web"
alias dpsql="docker-compose exec postgres psql"
alias drun='docker run --rm -it -v "${PWD}":/app'
alias rmpyc="find . -name '*.pyc' -exec rm -rf {} \;"
alias ymp3="youtube-dl --extract-audio --audio-format mp3"
alias octal="stat -c '%a %n'"
alias follow="namei -om"
alias diff="diff --color -u"
alias mklink=" . mklink.sh"
alias adb="~/dev/android/platform-tools/adb"
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'