annotate rc/bash @ 265:20ff9a9d11f0

tmux terminal for Solaris.
author Edho Arief <edho@myconan.net>
date Thu, 24 Nov 2011 13:28:13 +0700
parents c6c322c57e0e
children feab84a8efdb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
1 #!/usr/bin/env bash
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
2
242
ebfa844d2ef8 [bash] Also ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents: 238
diff changeset
3 case "${-}" in
ebfa844d2ef8 [bash] Also ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents: 238
diff changeset
4 *i*) ;;
ebfa844d2ef8 [bash] Also ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents: 238
diff changeset
5 *) return;;
ebfa844d2ef8 [bash] Also ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents: 238
diff changeset
6 esac
ebfa844d2ef8 [bash] Also ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents: 238
diff changeset
7
117
548cf46e9cb4 Ensures no double loading using C-style variable test.
Edho Prima Arief <edho@myconan.net>
parents: 112
diff changeset
8 if [ "${ECOS_BASH_LOADED}" != "yes" ]; then
122
eacc854eae67 Export should be used since it inherited to subshell (eg. tmux). Also hasten exit instead of fi on the bottom of file.
Edho Prima Arief <edho@myconan.net>
parents: 117
diff changeset
9 ECOS_BASH_LOADED="yes"
eacc854eae67 Export should be used since it inherited to subshell (eg. tmux). Also hasten exit instead of fi on the bottom of file.
Edho Prima Arief <edho@myconan.net>
parents: 117
diff changeset
10 else
eacc854eae67 Export should be used since it inherited to subshell (eg. tmux). Also hasten exit instead of fi on the bottom of file.
Edho Prima Arief <edho@myconan.net>
parents: 117
diff changeset
11 return
eacc854eae67 Export should be used since it inherited to subshell (eg. tmux). Also hasten exit instead of fi on the bottom of file.
Edho Prima Arief <edho@myconan.net>
parents: 117
diff changeset
12 fi
117
548cf46e9cb4 Ensures no double loading using C-style variable test.
Edho Prima Arief <edho@myconan.net>
parents: 112
diff changeset
13
71
40236fd0a3a5 Explicit path checking.
Edho Prima Arief <me@myconan.net>
parents: 67
diff changeset
14 [ -f "${HOME}/.ecos_bash.before" ] && . "${HOME}/.ecos_bash.before"
49
b924652e169d [bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents: 48
diff changeset
15
67
4510c8a9d8ec [bash] We have cygwin!
Edho Prima Arief <me@myconan.net>
parents: 63
diff changeset
16 _org_path="${PATH}"
62
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
17 export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
44
1f1af28f36e9 [bash] Bashrc, c-style ifdef.
Edho Prima Arief <me@myconan.net>
parents: 43
diff changeset
18
111
fd8dbd4bb758 ls color for freebsd, history control.
Edho Prima Arief <edho@myconan.net>
parents: 106
diff changeset
19 shopt -s histappend
fd8dbd4bb758 ls color for freebsd, history control.
Edho Prima Arief <edho@myconan.net>
parents: 106
diff changeset
20 PROMPT_COMMAND='history -a'
fd8dbd4bb758 ls color for freebsd, history control.
Edho Prima Arief <edho@myconan.net>
parents: 106
diff changeset
21 export HISTFILESIZE=10000
fd8dbd4bb758 ls color for freebsd, history control.
Edho Prima Arief <edho@myconan.net>
parents: 106
diff changeset
22 export HISTCONTROL=ignoredups
fd8dbd4bb758 ls color for freebsd, history control.
Edho Prima Arief <edho@myconan.net>
parents: 106
diff changeset
23
53
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
24 export PAGER="less -Rins"
49
b924652e169d [bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents: 48
diff changeset
25 export EDITOR=vi
89
29bd7f6ef58a Explicit LANG declaration.
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
26 export LANG="en_US.UTF-8"
101
a1c6b40a535f Ensure no Ubuntuism's ls color bastardization.
Edho Prima Arief <edho@myconan.net>
parents: 96
diff changeset
27 unset LS_COLORS
49
b924652e169d [bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents: 48
diff changeset
28
53
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
29 alias less="less -Rins"
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
30 #assuming POSIX grep
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
31 alias fgrep="grep -F"
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
32 alias egrep="grep -E"
62
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
33 alias ls="ls -F"
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
34 alias rm="rm -i"
75
f993714efa7b cool alias, bro (rdesktop)
Edho Prima Arief <me@myconan.net>
parents: 71
diff changeset
35 alias rd="rdesktop -g 1280x600 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5"
53
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
36
43
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
37 _has_rm_I=
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
38 _has_gnu_ls=
53
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
39 _has_gnu_grep=
238
5dcbf6ab0109 Prioritize gnuls over colorls on OpenBSD. Modified GNU ls alias to allow different executable name.
Edho Arief <edho@myconan.net>
parents: 141
diff changeset
40 _ls="ls"
43
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
41 case "$(uname -s)" in
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
42 Linux)
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
43 _has_rm_I=y
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
44 _has_gnu_ls=y
96
26c9dc482051 Merge. Linux obviously has gnu grep.
Edho Prima Arief <edho@myconan.net>
parents: 75
diff changeset
45 _has_gnu_grep=y
43
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
46 ;;
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
47 SunOS)
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
48 [ -x /usr/gnu/bin/rm ] && _has_rm_I=y
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
49 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y
53
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
50 [ -x /usr/gnu/bin/grep ] && _has_gnu_grep=y
253
e6de49d70fe7 (Not so) simplified solaris path add.
Edho Arief <edho@myconan.net>
parents: 252
diff changeset
51 # Higher priority directories
e6de49d70fe7 (Not so) simplified solaris path add.
Edho Arief <edho@myconan.net>
parents: 252
diff changeset
52 for i in {/opt/csw,/usr/gnu}/{,s}bin; do
e6de49d70fe7 (Not so) simplified solaris path add.
Edho Arief <edho@myconan.net>
parents: 252
diff changeset
53 [ -d "${i}" ] && PATH="${i}:${PATH}"
e6de49d70fe7 (Not so) simplified solaris path add.
Edho Arief <edho@myconan.net>
parents: 252
diff changeset
54 done
e6de49d70fe7 (Not so) simplified solaris path add.
Edho Arief <edho@myconan.net>
parents: 252
diff changeset
55 for i in /usr/{sfw,xpg4}/bin; do
e6de49d70fe7 (Not so) simplified solaris path add.
Edho Arief <edho@myconan.net>
parents: 252
diff changeset
56 [ -d "${i}" ] && PATH="${PATH}:${i}"
e6de49d70fe7 (Not so) simplified solaris path add.
Edho Arief <edho@myconan.net>
parents: 252
diff changeset
57 done
57
ada5b9534765 [bash] Sanitize sunos ping.
Edho Prima Arief <me@myconan.net>
parents: 56
diff changeset
58 alias ping="ping -s"
ada5b9534765 [bash] Sanitize sunos ping.
Edho Prima Arief <me@myconan.net>
parents: 56
diff changeset
59 alias ping6="ping -A inet6"
265
20ff9a9d11f0 tmux terminal for Solaris.
Edho Arief <edho@myconan.net>
parents: 264
diff changeset
60 # Hello tmux. Perhaps one day we'll have title with dtterm.
20ff9a9d11f0 tmux terminal for Solaris.
Edho Arief <edho@myconan.net>
parents: 264
diff changeset
61 # But for now we work this around by prepending tmux call with xtermc.
20ff9a9d11f0 tmux terminal for Solaris.
Edho Arief <edho@myconan.net>
parents: 264
diff changeset
62 alias tmux="TERM=xtermc tmux"
262
9481aac47ac5 Always use dtterm for Solaris if no relevant TERM found (usually missing screen or xterm-256color).
Edho Arief <edho@myconan.net>
parents: 261
diff changeset
63 [ -f "/usr/share/lib/terminfo/?/${TERM}" ] || export TERM=dtterm
43
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
64 ;;
53
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
65 FreeBSD)
43
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
66 _has_rm_I=y
111
fd8dbd4bb758 ls color for freebsd, history control.
Edho Prima Arief <edho@myconan.net>
parents: 106
diff changeset
67 export CLICOLOR=
fd8dbd4bb758 ls color for freebsd, history control.
Edho Prima Arief <edho@myconan.net>
parents: 106
diff changeset
68 export LSCOLORS=ExGxFxdxCxegedabagExEx
43
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
69 ;;
62
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
70 OpenBSD)
255
4a0f963a3ff1 PATH adjustment for OpenBSD.
Edho Arief <edho@myconan.net>
parents: 254
diff changeset
71 PATH="${PATH}:/usr/X11R6/bin"
238
5dcbf6ab0109 Prioritize gnuls over colorls on OpenBSD. Modified GNU ls alias to allow different executable name.
Edho Arief <edho@myconan.net>
parents: 141
diff changeset
72 if command -v gls > /dev/null 2>&1; then
5dcbf6ab0109 Prioritize gnuls over colorls on OpenBSD. Modified GNU ls alias to allow different executable name.
Edho Arief <edho@myconan.net>
parents: 141
diff changeset
73 _has_gnu_ls=y
5dcbf6ab0109 Prioritize gnuls over colorls on OpenBSD. Modified GNU ls alias to allow different executable name.
Edho Arief <edho@myconan.net>
parents: 141
diff changeset
74 _ls="gls"
5dcbf6ab0109 Prioritize gnuls over colorls on OpenBSD. Modified GNU ls alias to allow different executable name.
Edho Arief <edho@myconan.net>
parents: 141
diff changeset
75 elif command -v colorls > /dev/null 2>&1; then
62
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
76 export CLICOLOR=
140
110d0ec96f7c Sane color for openbsd.
Edho Arief <edho@myconan.net>
parents: 127
diff changeset
77 export LSCOLORS=ExGxFxdxCxegedabagExEx
62
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
78 alias ls='colorls -F'
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
79 fi
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
80 ;;
249
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
81 NetBSD)
255
4a0f963a3ff1 PATH adjustment for OpenBSD.
Edho Arief <edho@myconan.net>
parents: 254
diff changeset
82 PATH="${PATH}:/usr/pkg/bin:/usr/pkg/sbin"
249
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
83 if command -v gls > /dev/null 2>&1; then
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
84 _has_gnu_ls=y
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
85 _ls="gls"
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
86 elif command -v colorls > /dev/null 2>&1; then
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
87 export CLICOLOR=
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
88 export LSCOLORS=ExGxFxdxCxegedabagExEx
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
89 alias ls='colorls -F'
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
90 fi
68b765e9cf76 Some support for netbsd.
Edho Arief <edho@myconan.net>
parents: 247
diff changeset
91 ;;
67
4510c8a9d8ec [bash] We have cygwin!
Edho Prima Arief <me@myconan.net>
parents: 63
diff changeset
92 CYGWIN*)
4510c8a9d8ec [bash] We have cygwin!
Edho Prima Arief <me@myconan.net>
parents: 63
diff changeset
93 export PATH="${PATH}:${_org_path}"
4510c8a9d8ec [bash] We have cygwin!
Edho Prima Arief <me@myconan.net>
parents: 63
diff changeset
94 ;;
43
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
95 esac
b4965a1610f6 [bash] Yaaay bashrc.
Edho Prima Arief <me@myconan.net>
parents: 40
diff changeset
96
62
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
97 [ "${_has_rm_I}" = y ] && alias rm="rm -I"
238
5dcbf6ab0109 Prioritize gnuls over colorls on OpenBSD. Modified GNU ls alias to allow different executable name.
Edho Arief <edho@myconan.net>
parents: 141
diff changeset
98 [ "${_has_gnu_ls}" = y ] && alias ls="${_ls} -F --color=auto"
62
996aa2f81721 [bash] various fixes:
Edho Prima Arief <me@myconan.net>
parents: 60
diff changeset
99 [ "${_has_gnu_grep}" = y ] && alias grep="grep --color=auto"
53
b9db5d89aae3 [bash] POSIX grep, GNU grep, standardized quote (" unless ' required).
Edho Prima Arief <me@myconan.net>
parents: 52
diff changeset
100
49
b924652e169d [bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents: 48
diff changeset
101 unset _has_rm_I
b924652e169d [bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents: 48
diff changeset
102 unset _has_gnu_ls
58
73b2fccc4f06 [bash] missed unset.
Edho Prima Arief <me@myconan.net>
parents: 57
diff changeset
103 unset _has_gnu_grep
238
5dcbf6ab0109 Prioritize gnuls over colorls on OpenBSD. Modified GNU ls alias to allow different executable name.
Edho Arief <edho@myconan.net>
parents: 141
diff changeset
104 unset _ls
49
b924652e169d [bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents: 48
diff changeset
105
261
00ecebc73c73 Path rearrange.
Edho Arief <edho@myconan.net>
parents: 260
diff changeset
106 # Custom application I usually install and safe to prioritize
00ecebc73c73 Path rearrange.
Edho Arief <edho@myconan.net>
parents: 260
diff changeset
107 for i in {"${HOME}/app","/opt"}/{tmux,ruby19,node,tarsnap,symon,nginx}/{bin,sbin}; do
00ecebc73c73 Path rearrange.
Edho Arief <edho@myconan.net>
parents: 260
diff changeset
108 [ -d "${i}" ] && PATH="${i}:${PATH}"
00ecebc73c73 Path rearrange.
Edho Arief <edho@myconan.net>
parents: 260
diff changeset
109 done
00ecebc73c73 Path rearrange.
Edho Arief <edho@myconan.net>
parents: 260
diff changeset
110
264
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
111 # MySQL in common locations highest priority since new = better. Also no compatibility problem.
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
112 # Cluster is superset of Enterprise/GPL so it gets highest priority.
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
113 # And use only one.
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
114 for mydir in {"${HOME}",/app{,s},/opt}/mysql/{{cluster,enterprise}/mysql/,}bin; do
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
115 if [ -d "${mydir}" ]; then
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
116 PATH="${mydir}:${PATH}"
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
117 break
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
118 fi
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
119 done
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
120
261
00ecebc73c73 Path rearrange.
Edho Arief <edho@myconan.net>
parents: 260
diff changeset
121 # Mercurial is optional since it will be inconsistent with ssh ... hg if this one gets priority.
264
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
122 # And use only one.
261
00ecebc73c73 Path rearrange.
Edho Arief <edho@myconan.net>
parents: 260
diff changeset
123 for hgdir in {"${HOME}/app","/opt"}/mercurial; do
264
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
124 if [ -x "${hgdir}/hg" ]; then
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
125 PATH="${PATH}:${hgdir}"
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
126 break
c6c322c57e0e Paths for MySQL, instabreak for mercurial.
Edho Arief <edho@myconan.net>
parents: 262
diff changeset
127 fi
261
00ecebc73c73 Path rearrange.
Edho Arief <edho@myconan.net>
parents: 260
diff changeset
128 done
56
9343fa4dfd91 [bash] we have vim. Probably.
Edho Prima Arief <me@myconan.net>
parents: 55
diff changeset
129
59
757576a3fa79 [bash] titlebar!
Edho Prima Arief <me@myconan.net>
parents: 58
diff changeset
130 case "${TERM}" in
254
dde04581a2bf Combined PS1 and PROMPT_COMMAND conditional.
Edho Arief <edho@myconan.net>
parents: 253
diff changeset
131 xterm*|screen*|dtterm*)
260
6bdfe1746bb1 Solaris' id doesn't have `id -un`, use `who am i | cut -d ' ' -f 1` instead.
Edho Arief <edho@myconan.net>
parents: 257
diff changeset
132 PROMPT_COMMAND='echo -ne "\033]0;'"$(who am i | cut -d ' ' -f 1)@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}"
254
dde04581a2bf Combined PS1 and PROMPT_COMMAND conditional.
Edho Arief <edho@myconan.net>
parents: 253
diff changeset
133 PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[1;34m\]\W\[\e[0m\]]\$ '
dde04581a2bf Combined PS1 and PROMPT_COMMAND conditional.
Edho Arief <edho@myconan.net>
parents: 253
diff changeset
134 ;;
dde04581a2bf Combined PS1 and PROMPT_COMMAND conditional.
Edho Arief <edho@myconan.net>
parents: 253
diff changeset
135 *)
dde04581a2bf Combined PS1 and PROMPT_COMMAND conditional.
Edho Arief <edho@myconan.net>
parents: 253
diff changeset
136 PS1='[\u@\h \W]\$ '
59
757576a3fa79 [bash] titlebar!
Edho Prima Arief <me@myconan.net>
parents: 58
diff changeset
137 ;;
757576a3fa79 [bash] titlebar!
Edho Prima Arief <me@myconan.net>
parents: 58
diff changeset
138 esac
757576a3fa79 [bash] titlebar!
Edho Prima Arief <me@myconan.net>
parents: 58
diff changeset
139
63
b7814634220a [bash] branch merge, added EDITOR change to vim when detected.
Edho Prima Arief <me@myconan.net>
parents: 62
diff changeset
140 if command -v vim > /dev/null 2>&1; then
b7814634220a [bash] branch merge, added EDITOR change to vim when detected.
Edho Prima Arief <me@myconan.net>
parents: 62
diff changeset
141 alias vi=vim
b7814634220a [bash] branch merge, added EDITOR change to vim when detected.
Edho Prima Arief <me@myconan.net>
parents: 62
diff changeset
142 export EDITOR=vim
b7814634220a [bash] branch merge, added EDITOR change to vim when detected.
Edho Prima Arief <me@myconan.net>
parents: 62
diff changeset
143 fi
71
40236fd0a3a5 Explicit path checking.
Edho Prima Arief <me@myconan.net>
parents: 67
diff changeset
144 [ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after"
117
548cf46e9cb4 Ensures no double loading using C-style variable test.
Edho Prima Arief <edho@myconan.net>
parents: 112
diff changeset
145