-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_bash_profile.sh
67 lines (48 loc) · 947 Bytes
/
local_bash_profile.sh
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
# Bash
alias ssb="source ~/.bash_profile"
# FZF
export FZF_DEFAULT_COMMAND='fd --type f'
open() {
output=$(fzf)
if [ -n "$output" ]; then
vim $output
fi
}
alias files="tree -I 'node_modules|dist'"
search() {
ag "$*"
}
# NOTE ! When searching for anything with quotes, remember to escape them as bash won't pass in the quotes directly otherwise
# `search import React from "react";` won't work
# `search import React from \"react\";` will work
# Git helpers
alias checkout="git checkout"
alias branch="git branch"
alias status="git status"
alias add="git add"
commit() {
git commit -m "$*"
}
alias diff="git diff"
alias push-all="git push --all"
merge() {
git merge "$1"
}
#
#clear-all-changes() {
# git checkout -- "."
#}
___internal_push_all() {
git push --all
}
alias push-all="___internal_push_all"
# NPM helpers
nrun() {
npm run "$*"
}
nadd() {
npm install $*
}
ndad() {
npm install --save-dev $*
}