-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
69 lines (50 loc) · 1.66 KB
/
bashrc
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
68
69
# -------- this .bashrc file fully pwned by
# _ _ _
# _| |___ _ _ ___| |___ ___ | |___ ___
# | . | . | | | . | | .'|_ -| | | -_| -_|
# |___|___|___|_ |_|__,|___| |_|___|___|
# |___|
#
# -----------------------------------------
# ------------------------------------- /ETC/BASHRC
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
[ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM"
# ------------------------------------- GLOBAL ALIAS
alias brc='vim ~/.bashrc'
alias sbrc='source ~/.bashrc'
alias pg='ping www.google.com'
alias l='ls -l1GF'
alias lx='ls -lGF'
alias la='ls -laGF'
alias ..='cd ..'
function cl(){ cd "$@" && la; }
# ------------------------------------- ORIGINAL
#if [ -f ~/.bashrc ]; then
# . ~/.bashrc
#fi
# System-wide .bashrc file for interactive bash(1) shells.
#if [ -z "$PS1" ]; then
# return
#fi
#PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
#shopt -s checkwinsize
# Tell the terminal about the working directory at each prompt.
if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then
update_terminal_cwd() {
# Identify the directory using a "file:" scheme URL,
# including the host name to disambiguate local vs.
# remote connections. Percent-escape spaces.
local SEARCH=' '
local REPLACE='%20'
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
printf '\e]7;%s\a' "$PWD_URL"
}
PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND"
fi