Mercurial > ec-dotfiles
comparison rc/bashrc @ 703:b7cd7465cc26
[bashrc] unleak variables
| author | nanaya <me@nanaya.net> |
|---|---|
| date | Sun, 18 Dec 2022 19:29:43 +0900 |
| parents | 8c2ba562b15a |
| children | 81711bd8cac9 |
comparison
equal
deleted
inserted
replaced
| 702:48b0cfae98be | 703:b7cd7465cc26 |
|---|---|
| 168 _root_opt="" | 168 _root_opt="" |
| 169 if [ "${_uid}" = "0" ]; then | 169 if [ "${_uid}" = "0" ]; then |
| 170 _root_opt=" -A" | 170 _root_opt=" -A" |
| 171 fi | 171 fi |
| 172 alias ls="${_ls}${_root_opt} -F --color=auto --group-directories-first" | 172 alias ls="${_ls}${_root_opt} -F --color=auto --group-directories-first" |
| 173 unset _root_opt | |
| 173 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'; | 174 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'; |
| 174 export LS_COLORS | 175 export LS_COLORS |
| 175 fi | 176 fi |
| 176 if [ "${_has_gnu_grep}" = y ]; then | 177 if [ "${_has_gnu_grep}" = y ]; then |
| 177 alias grep="${_grep} --color=auto" | 178 alias grep="${_grep} --color=auto" |
| 208 done | 209 done |
| 209 | 210 |
| 210 # MySQL in common locations highest priority since new = better. Also no compatibility problem. | 211 # MySQL in common locations highest priority since new = better. Also no compatibility problem. |
| 211 # Cluster is superset of Enterprise/GPL so it gets highest priority. | 212 # Cluster is superset of Enterprise/GPL so it gets highest priority. |
| 212 # And use only one. | 213 # And use only one. |
| 213 for mydir in {"${HOME}",/apps,/opt}/mysql/{{cluster,enterprise}/mysql/,}bin; do | 214 for i in {"${HOME}",/apps,/opt}/mysql/{{cluster,enterprise}/mysql/,}bin; do |
| 214 if [ -d "${mydir}" ]; then | 215 if [ -d "${i}" ]; then |
| 215 PATH="${mydir}:${PATH}" | 216 PATH="${i}:${PATH}" |
| 216 break | 217 break |
| 217 fi | 218 fi |
| 218 done | 219 done |
| 219 | 220 |
| 220 # Mercurial is optional since it will be inconsistent with ssh ... hg if this one gets priority. | 221 # Mercurial is optional since it will be inconsistent with ssh ... hg if this one gets priority. |
| 221 # And use only one. | 222 # And use only one. |
| 222 for hgdir in {"${HOME}/apps","/opt"}/mercurial{,/bin}; do | 223 for i in {"${HOME}/apps","/opt"}/mercurial{,/bin}; do |
| 223 hgbin="${hgdir}/hg" | 224 _hgbin="${i}/hg" |
| 224 if [ -x "${hgbin}" ]; then | 225 if [ -x "${_hgbin}" ]; then |
| 225 PATH="${PATH}:${hgdir}" | 226 PATH="${PATH}:${hgdir}" |
| 226 alias nhg="${hgbin}" | 227 alias nhg="${_hgbin}" |
| 227 break | 228 break |
| 228 fi | 229 fi |
| 229 done | 230 done |
| 230 | 231 unset _hgbin |
| 231 for supbindir in {"${HOME}/apps","/opt"}/supervisor{,d}/bin; do | 232 |
| 232 if [ -d "${supbindir}" ]; then | 233 for i in {"${HOME}/apps","/opt"}/supervisor{,d}/bin; do |
| 233 PATH="${PATH}:${supbindir}" | 234 if [ -d "${i}" ]; then |
| 235 PATH="${PATH}:${i}" | |
| 234 break | 236 break |
| 235 fi | 237 fi |
| 236 done | 238 done |
| 237 | 239 |
| 238 PS1='\u@\h:\w\$ ' | 240 PS1='\u@\h:\w\$ ' |
| 308 fi | 310 fi |
| 309 | 311 |
| 310 unset _os | 312 unset _os |
| 311 unset _os_r | 313 unset _os_r |
| 312 unset _uid | 314 unset _uid |
| 315 unset i | |
| 313 | 316 |
| 314 # reset cursor shape | 317 # reset cursor shape |
| 315 # reference: https://conemu.github.io/en/AnsiEscapeCodes.html#Terminal_modes | 318 # reference: https://conemu.github.io/en/AnsiEscapeCodes.html#Terminal_modes |
| 316 printf '\033[2 q' | 319 printf '\033[2 q' |
| 317 | 320 |
