-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
71 lines (58 loc) · 1.65 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
#!/bin/bash
# enable aliases to be sudo’ed
alias sudo='sudo '
# get week number
alias week='date +%V'
# Reload the shell (i.e. invoke as a login shell)
alias rl="exec ${SHELL} -l"
# xclip
if which xclip >/dev/null 2>&1; then
alias c="xclip -selection clipboard"
alias p="xclip -o -selection clipboard"
fi
if [[ $OSTYPE == 'darwin'* ]]; then
alias c="pbcopy"
alias p="pbpaste"
fi
# tmux
alias t=tmux
alias tl='tmux ls'
alias tn='tmux new -s'
alias ta='tmux attach -t'
alias tk='tmux kill-session -t'
alias tkS='tmux kill-server'
# tmuxifier
alias tx=tmuxifier
alias txl='tmuxifier load-session'
alias txn='tmuxifier new-session'
# shortcuts
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias dw="cd ~/workspace"
alias dwo="cd ~/workspace/others"
alias dwg="cd ~/workspace"
alias dwgh="cd ~/workspace/github.com"
alias dwgl="cd ~/workspace/gitlab.com"
# mac hide/show all desktop icons
if which defaults > /dev/null 2>&1; then
alias desktophide="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias desktopshow="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
fi
# always enable colored `grep` output
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# vim related
alias v=nvim
alias vim=nvim
# programs
alias g=git
alias lg=lazygit
alias k=kubectl
alias rr='ranger --choosedir=$HOME/.rangerdir; RANGER_LAST_DIR=`cat $HOME/.rangerdir`; cd "$RANGER_LAST_DIR"'
alias dk=docker
alias python=python3
alias cdk='npx aws-cdk'
alias cl='clear && tmux clear-history'
# dotfiles setup bare git
alias dtf='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'