-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.alias
53 lines (40 loc) · 1.09 KB
/
.alias
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
#!/usr/bin/env bash
# Navigation
alias ..="cd .."
alias ...="cd ../.."
alias ~="cd ~"
# List
alias l="ls -lAh"
alias ll="du -sh *"
# Reset
alias r="clear && printf '\e[3J'"
# Reload
alias reload="source ~/.bash_profile"
# Enable aliases to be used with sudo
alias sudo='sudo '
# Print each PATH entry on a separate line
alias path='echo -e ${PATH//:/\\n} | sort'
# Git
alias g="git"
alias history-recent="tail -n 100 .bash_history"
# Request using GET, POST, etc. method
# for METHOD in GET HEAD POST PUT DELETE TRACE OPTIONS; do
# alias "$METHOD"="lwp-request -m '$METHOD'"
# done
# unset METHOD
# Hosts
if [ -z "$EDITOR" ]; then
EDITOR=nano # Using nano to open hosts file if no editor is defined
fi
alias hosts="sudo $EDITOR /etc/hosts"
# List Environment Variables
alias printenv='printenv | sort'
# If you use VSCodium instead of VSCode
# alias code="codium"
if [[ $OS_VARIANT == "mac" ]]; then
source "$DOTFILES_DIR/alias_macos"
elif [[ $OS_VARIANT == "linux" ]]; then
source "$DOTFILES_DIR/alias_linux"
elif [[ $OS_VARIANT == "wsl" ]]; then
source "$DOTFILES_DIR/alias_wsl"
fi