Compare commits
9 Commits
eda364400e
...
ad02049329
| Author | SHA1 | Date | |
|---|---|---|---|
| ad02049329 | |||
| dcb30d0bea | |||
| 945536a29c | |||
| 76dadcf5d9 | |||
| 25adad8c1c | |||
| 07a9418459 | |||
| 84778882e8 | |||
| c98c6eb1ec | |||
| d14e4c3cd9 |
@@ -31,7 +31,8 @@ export PATH="$PATH:$VCPKG_ROOT"
|
||||
# if executing interactively
|
||||
# execute .bashrc in the current login context
|
||||
case $- in
|
||||
*i*) return ;;
|
||||
*i*) ;;
|
||||
*) return ;;
|
||||
esac
|
||||
[ -z "${PS1-}" ] && return
|
||||
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
|
||||
|
||||
11
.bashrc
11
.bashrc
@@ -6,7 +6,8 @@
|
||||
#
|
||||
|
||||
case $- in
|
||||
*i*) return ;;
|
||||
*i*) ;;
|
||||
*) return ;;
|
||||
esac
|
||||
[ -z "${PS1-}" ] && return
|
||||
|
||||
@@ -50,15 +51,15 @@ __regenprompt() {
|
||||
local git=$(__lazy_git_ps1)
|
||||
|
||||
if [ $err -ne 0 ]; then
|
||||
err="\033[s\033[$((COLUMNS - 4))G${err}\033[u"
|
||||
err="\[\033[$((COLUMNS - 4))G\033[01;31m\]${err}\[\033[0G\]"
|
||||
else unset err; fi
|
||||
|
||||
PS1="\[\033[?25h\]" # show cursor
|
||||
PS1="$err" # error code
|
||||
PS1="$PS1\[\033[?25h\]" # show cursor
|
||||
PS1="$PS1\[\033[01;35m\]\u@\h" # user@host
|
||||
PS1="$PS1\[\033[00m\]:" # separator
|
||||
PS1="$PS1\[\033[01;34m\]\w" # working directory
|
||||
PS1="$PS1\[\033[01;93m\]$git" # git branch
|
||||
PS1="$PS1\[\033[01;31m\]\[$err\]" # error code
|
||||
PS1="$PS1\[\033[01;93m\]${git}" # git branch
|
||||
PS1="$PS1\[\033[00m\]\$ " # shell sign
|
||||
}
|
||||
PROMPT_COMMAND=__regenprompt
|
||||
|
||||
1
etc/i3
1
etc/i3
Submodule etc/i3 deleted from c59f51a0a9
1
etc/nvim
1
etc/nvim
Submodule etc/nvim deleted from 6da6d4ffb9
Reference in New Issue
Block a user