-
Notifications
You must be signed in to change notification settings - Fork 3
/
.zsh_aliases
50 lines (44 loc) · 1.52 KB
/
.zsh_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
alias g='grep -i'
alias get='curl -OL'
alias update='git checkout . && git checkout main && git pull origin main && bundle && yarn install && rails db:migrate'
alias elastic='cd ~/Downloads/elasticsearch-5.6.15 && bin/elasticsearch'
alias python=python3
alias dot="cd ~/dotfiles"
#alias ctags="`brew --prefix`/bin/ctags"
alias glive='git stash && git checkout main && git stash && git pull && git reset --hard origin/main && gem install bundler && bundle install && yarn install && rake db:migrate && git stash'
#git
alias gap='git add --intent-to-add . && git add --patch'
alias gc='git commit -v'
alias gpoh='git push origin HEAD'
alias gs='git status'
alias gd='git diff'
alias pretty='git commit -m "Make it prettier"'
alias g-a='git add -A'
#js
alias s_test='./script/start-test'
alias s_yarn='yarn build:development'
alias lint='yarn run lint'
#ruby
alias rs='rails server'
alias rc='rails console'
#to extract all the things
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar e $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}