-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
62 lines (57 loc) · 1.35 KB
/
.bash_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
# General
alias ..="cd .."
alias d="docker"
alias dc="docker-compose"
alias egrep="egrep --color=auto"
alias fgrep="fgrep --color=auto"
alias grep="grep --color=auto"
alias gtime="/usr/bin/time"
alias la="ls -la"
alias ll="ls -l"
alias ls="ls -G"
alias py3="python3"
alias py="python"
alias reload=". ~/.zshrc"
alias h="head"
alias t="tail"
alias v="vim"
alias prettyjson="python3 -m json.tool"
alias env=". venv/bin/activate"
alias k="kubectl"
# dnf
alias dnfc='dnf clean all'
alias dnfi='dnf install'
alias dnfr='dnf remove'
alias dnfs='dnf search'
alias dnfu='dnf update'
# git
alias gaa='git add -A'
alias gad='git add'
alias gbr='git branch'
alias gci='git commit'
alias gco='git checkout'
alias gdf='git diff'
alias github=Github
alias glo='git log'
alias gpl='git pull'
alias gpu='git push'
alias grb='git rebase'
alias gst='git status'
alias gus='git reset HEAD'
urlunquote() {
python3 -c "import urllib.parse; print(urllib.parse.unquote('$1', safe=''))"
}
whereru() {
curl -s https://api.ipgeolocationapi.com/geolocate/$1
}
Gitlab() {
if [ ! -d .git ] ;
then echo "ERROR: This isnt a git directory" && return false;
fi
git_url=`git config --get remote.origin.url`
if [[ $git_url != https://git.hcrudolph.com* ]] ;
then echo "ERROR: Remote origin is invalid" && return false;
fi
url=${git_url%.git}
firefox $url
}