-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
57 lines (42 loc) · 1.27 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
#!/bin/bash
colorflag="--color"
# Filesystem
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# List all files colorized in long format
# shellcheck disable=SC2139
alias ls="ls -lF ${colorflag}"
# List all files colorized in long format, including dot files
# shellcheck disable=SC2139
alias la="ls -laF ${colorflag}"
# List only directories
# shellcheck disable=SC2139
alias lsd="ls -lF ${colorflag} | grep --color=never '^d'"
# Grep colourisation
alias grep='grep --color'
# Helper to open stuff in Chrome
alias open-chrome='open -a "Google Chrome"'
# Date related aliases
alias week='date +%V'
# Handy helper to get a GUID
alias guid='uuidgen | tr "[:upper:]" "[:lower:]"'
# IP addresses
alias publicip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ifconfig | grep 'inet ' | grep 192.* | cut -d ':' -f 2 | cut -d ' ' -f 1"
# Vagrant
alias vssh='vagrant ssh'
alias vprune='vagrant box prune'
# Git
alias git-top='git rev-parse --show-toplevel'
alias gfo='git f origin'
# Fake Explorer command
alias explorer="xdg-open . & sleep 1"
# Use vtop instead of top
alias top="vtop"
alias vtop="vtop --theme brew"
# Quick folders
alias work="cd ~/git/emisgroup"
alias mine="cd ~/git/markgaze"
alias nt="( urxvt & ) &>/dev/null"
alias weather="curl wttr.in"