-
Notifications
You must be signed in to change notification settings - Fork 2
/
.aliases
67 lines (53 loc) · 1.37 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
#!/bin/bash
PINK='\033[0;35m'
NC='\033[0m' # No Color
function print_color () {
printf "${PINK}$@\n${NC}"
}
# git
alias gs="print_color \"git status\"; git status "
alias ga="print_color \"git add --all\"; git add --all "
alias gc="print_color \"git commit -a\"; git commit -a "
alias gcm="print_color \"git commit -am\"; git commit -am "
alias gacm="ga; gcm "
alias gpl="print_color \"git pull\"; git pull"
alias gf="print_color \"git fetch\"; git fetch"
alias gp="print_color \"git push\"; git push"
function gacmp () {
ga
print_color "git commit"
git commit -am "$@"
gp
gs
}
#ls
alias l="exa -la"
# cd
alias clr="clear"
alias cdd="cd ~/Projects/dotfiles/ && l"
alias cdp="cd ~/Projects/ && l"
function cl () {
cd "$@" && l
}
# others
alias v="vim"
alias p="pacman"
alias y="yay"
alias r="ranger"
alias rm="rimraf"
# ssh
alias sshpi="ssh pi@pihole"
# git alias for dotfiles bare git repo
alias config='/usr/bin/git --git-dir=/home/kowal/.cfg/ --work-tree=/home/kowal'
# config
alias cgs="print_color \"config status\"; config status "
alias cga="print_color \"config add -u\"; config add -u "
alias cgacm="print_color \"config commit -am\"; config commit -am "
alias cgpl="print_color \"config pull\"; config pull"
alias cgf="print_color \"config fetch\"; config fetch"
alias cgp="print_color \"config push\"; config push"
function cgacmp () {
cgacm "$@"
cgp
cgs
}