-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaliases
More file actions
43 lines (38 loc) · 1.08 KB
/
aliases
File metadata and controls
43 lines (38 loc) · 1.08 KB
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
# shellcheck shell=sh
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
if command -v batcat >/dev/null; then
alias bat=batcat
fi
alias cdpath="echo \$CDPATH | tr -s ':' '\\n'"
alias debu='sudo apt update && sudo apt full-upgrade && sudo apt autoremove'
alias df='df -h'
alias hex='openssl rand -hex'
alias pag='ps aux | head -n1; ps aux | grep -i'
alias path="echo \$PATH | tr -s ':' '\\n'"
alias sa=ssh-add
alias uuid='uuidgen | tr A-F a-f'
if command -v xdg-open >/dev/null; then
alias open='xdg-open'
fi
[ -n "$BASH_VERSION" ] && alias reload=". ~/.bashrc"
[ -n "$ZSH_VERSION" ] && alias reload=". ~/.zshrc"
alias RM='rm -rf'
mkcd() {
# shellcheck disable=SC3028
mkdir -p "$@" && cd "$_" || return
}
wbat() {
which "$@" | grep -vE "aliased to|not found" | xargs --no-run-if-empty batcat
}
wfile() {
which "$@" | grep --color=never -E "aliased to|not found"
which "$@" | grep -vE "aliased to|not found" | xargs --no-run-if-empty file
}
for aliasfile in "$HOME/.aliases.d"/*.sh; do
. "$aliasfile"
done
if [ -f "$HOME/.aliases.local" ]; then
. "$HOME/.aliases.local"
fi