Xinqi Bao's Git

chore(bashrc): reorganize config and adapt ls for macOS
authorXinqi Bao <[email protected]>
Sun, 18 Jan 2026 14:43:47 +0000 (22:43 +0800)
committerXinqi Bao <[email protected]>
Sun, 18 Jan 2026 14:45:29 +0000 (22:45 +0800)
- add -G flag for ls color on macOS
- use inline comments for proxy config instead of heredoc
- reorder export statements for better readability

.bashrc

diff --git a/.bashrc b/.bashrc
index 108d1b7..e697659 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -9,15 +9,24 @@ export PATH=${HOME}/.local/opt/node/bin:${PATH}
 export PATH=${HOME}/.local/bin:${PATH}
 export PATH=${HOME}/tool:${PATH}
 
 export PATH=${HOME}/.local/bin:${PATH}
 export PATH=${HOME}/tool:${PATH}
 
-alias ls='ls --color=auto'
-alias ll='ls --color=auto -lhrt'
+alias ls='ls --color=auto -G'
+alias ll='ls --color=auto -G -lhrt'
 alias vim='nvim'
 alias vimdiff='nvim -d'
 
 export EDITOR=nvim
 export BROWSER=firefox
 alias vim='nvim'
 alias vimdiff='nvim -d'
 
 export EDITOR=nvim
 export BROWSER=firefox
-export TERM=xterm-256color
+
 export PS1="[\[\e[36;1m\]\u@\h \[\e[32;1m\]\w\[\e[m\]]\[\e[33m\](\$(git branch 2>/dev/null | grep '^*' | colrm 1 2))\n\[\e[m\]~~~>\$ "
 export PS1="[\[\e[36;1m\]\u@\h \[\e[32;1m\]\w\[\e[m\]]\[\e[33m\](\$(git branch 2>/dev/null | grep '^*' | colrm 1 2))\n\[\e[m\]~~~>\$ "
+export TERM=xterm-256color
+
+ulimit -c unlimited
+
+#export proxy_url=http://localhost:1080
+#export http_proxy=$proxy_url
+#export https_proxy=$proxy_url
+#export HTTP_PROXY=$proxy_url
+#export HTTPS_PROXY=$proxy_url
 
 # Set up fzf key bindings and fuzzy completion
 eval "$(fzf --bash)"
 
 # Set up fzf key bindings and fuzzy completion
 eval "$(fzf --bash)"
@@ -25,16 +34,6 @@ export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-ran
 
 [ -f ${HOME}/.cargo/env ] && . ${HOME}/.cargo/env
 
 
 [ -f ${HOME}/.cargo/env ] && . ${HOME}/.cargo/env
 
-ulimit -c unlimited
-
-<<COMMENT
-export proxy_url=http://localhost:1080
-export http_proxy=$proxy_url
-export https_proxy=$proxy_url
-export HTTP_PROXY=$proxy_url
-export HTTPS_PROXY=$proxy_url
-COMMENT
-
 if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
   exec startx
 fi
 if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
   exec startx
 fi