X-Git-Url: https://git.xinqibao.xyz/dotfiles.git/blobdiff_plain/b741520b0a15da99ce0e3de3e6d4646743e338fd..93db46d3b28e939ce08a3c3f79440f20c588078b:/.bashrc diff --git a/.bashrc b/.bashrc index 108d1b7..be35211 100644 --- a/.bashrc +++ b/.bashrc @@ -5,36 +5,37 @@ # If not running interactively, don't do anything [[ $- != *i* ]] && return -export PATH=${HOME}/.local/opt/node/bin:${PATH} -export PATH=${HOME}/.local/bin:${PATH} -export PATH=${HOME}/tool:${PATH} +export PATH="${HOME}/.local/opt/node/bin:${PATH}" +export PATH="${HOME}/.local/bin:${PATH}" +export PATH="${HOME}/tool:${PATH}" + +# Let mise take precedence over Cargo and local tools. +[ -f "${HOME}/.cargo/env" ] && . "${HOME}/.cargo/env" +if command -v mise >/dev/null 2>&1; then + eval "$(mise activate bash)" +fi alias ls='ls --color=auto' -alias ll='ls --color=auto -lhrt' +alias ll='ls -lhrt' + 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\]~~~>\$ " -# Set up fzf key bindings and fuzzy completion -eval "$(fzf --bash)" -export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :500 {}'" - -[ -f ${HOME}/.cargo/env ] && . ${HOME}/.cargo/env +PS1='[\[\e[36;1m\]\u@\h \[\e[32;1m\]\w\[\e[m\]]\[\e[33m\]($(git symbolic-ref --quiet --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null))\n\[\e[m\]~~~>\$ ' ulimit -c unlimited -<