-
Notifications
You must be signed in to change notification settings - Fork 1
/
.aliases
125 lines (108 loc) · 2.96 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/bin/sh
# commands preloaded w/ default args
alias ls='ls -F --color'
alias mv='mv -v'
alias rm='rm -i -v'
alias cp='cp -v'
alias mkdir='mkdir -p -v'
alias emacs='emacs -nw'
alias act='act --env-file="$HOME/.config/act/.env"'
# single letter shortcuts to core commands
alias a=''
alias b='bat'
alias c='cat'
alias d='dirs -v | head -10'
alias e=''
alias f='fff'
alias g='git'
alias h=''
alias i=''
alias j=''
alias k=''
alias l='ls -F --color'
alias m='mkdir'
alias n='nnn'
alias o=''
alias p=''
alias q=''
alias r='rm'
alias s='sudo'
alias t='task'
alias u=''
alias v='nvim'
alias w=''
alias x=''
alias y='yarn'
alias z=''
# commands aliased to alternatives
alias vim='nvim'
# docker
# TODO
# facebook messenger
fbm() { messer "$@"; }
fbmc() { fbm --command="contacts"; }
fbmh() { fbm --command="history \"$1\" ${2:-10}"; }
fbmm() { contact="$1"; shift; message="$*"; messer --command="message \"$contact\" $message"; }
fbmr() { messer --command="reply \"$*\""; }
fbmrc() { messer --command="recent ${1:-10}"; }
# git
alias ga='git add .'
alias gc='git commit'
alias gca='git commit --amend'
alias gco='git checkout'
alias gd="git diff --color | sed 's/^\([^-+ ]*\)[-+ ]/\\1/' | less -r"
alias gf='git fetch'
alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
alias gnb='git checkout -b'
alias gp='git push origin HEAD'
alias gpf='git push origin HEAD --force'
alias gs='git status -sb'
# soundcloud (tizonia)
alias scartist='tiz --soundcloud-creator'
alias sclikes='tizonia --soundcloud-user-likes'
alias scstream='tizonia --soundcloud-user-stream'
alias sclist='tizonia --soundcloud-user-playlist'
# spotify (tizonia)
alias spartist='tizonia --spotify-artist'
alias spalbum='tizonia --spotify-album'
alias splist='tizonia --spotify-playlist'
alias sptrack='tizonia --spotify-tracks'
# tmux
alias tm='tmux'
alias tmx='tmux new-session -d -s meatmux; tmux new-session -t meatmux \; set-option destroy-unattached || tmux new-session -t meatmux'
alias tma='tmux attach -t'
alias tmad='tmux attach -d -t'
alias tmls='tmux list-sessions'
alias tmksv='tmux kill-server'
alias tmkss='tmux kill-session -t'
# task(warrior)
alias t='task'
alias tf='task | fzf'
alias tadd='task add'
alias tactive='task active'
alias tappend='task append'
alias tdone='task done'
alias trm='task delete'
alias tedit='task edit'
alias tmod='task modify'
alias tstart='task start'
alias tstop='task stop'
# vim
alias vf='nvim $(fzf)'
# apps
alias code='code-insiders'
# shortcuts
alias chmox='chmod +x' # flags a file as executable
en() { awk '{printf "%s\\n", $0}' "$1"; } # escapes newlines
# clipboard
alias getclip="xclip -selection c -o"
alias setclip="xclip -selection c"
# cli
alias shc="shellcheck"
alias shfc="shfmt"
alias rn='react-native'
# term
alias reload!='. "$HOME"/.profile'
alias cls='clear'
# ssh
# alias cpkey='copyq copy - < ~/.ssh/id_rsa.pub | echo 'Public key copied to pasteboard.''