-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
58 lines (43 loc) · 1.48 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
#!/bin/bash
# shortcuts
alias k="kubectl"
alias g="git"
alias minikube_start="minikube start --vm-driver kvm2"
# We want pb on linux
command -v pbcopy > /dev/null || alias pbcopy='xclip -selection clipboard'
command -v pbpaste > /dev/null || alias pbpaste='xclip -selection clipboard -o'
alias shrug="echo '¯\\_(ツ)_/¯' | pbcopy"
# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color=auto"
elif command -v gls > /dev/null; then
colorflag="--color=auto"
else # OS X `ls`
colorflag="-G"
fi
# Always use color output for `ls`
# shellcheck disable=SC2139
alias ls="command ls ${colorflag}"
# enable color support
if [[ -x /usr/bin/dircolors ]]; then
# shellcheck disable=SC2015
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
fi
# Always enable colored `grep` output
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# Get week number
alias week='date +%V'
# OS X has no `md5sum`, so use `md5` as a fallback
command -v md5sum > /dev/null || alias md5sum="md5"
# OS X has no `sha1sum`, so use `shasum` as a fallback
command -v sha1sum > /dev/null || alias sha1sum="shasum"
# copy file interactive
alias cp='cp -i'
# move file interactive
alias mv='mv -i'
command -v update-alternatives > /dev/null || alias vim='NVIM_TUI_ENABLE_TRUE_COLOR=1 nvim'
alias tmuxa="tmux new-session -A -s main -D"