Compare commits
7 Commits
ad02049329
...
eda364400e
| Author | SHA1 | Date | |
|---|---|---|---|
| eda364400e | |||
| 4ece5d2147 | |||
| 61f105088c | |||
| 434b87bcbd | |||
| b62130c5ea | |||
| c6f0ff3de7 | |||
| 1236abfd24 |
@@ -31,8 +31,7 @@ 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"
|
||||
|
||||
19
.bashrc
19
.bashrc
@@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return ;;
|
||||
*i*) return ;;
|
||||
esac
|
||||
[ -z "${PS1-}" ] && return
|
||||
|
||||
@@ -51,16 +50,16 @@ __regenprompt() {
|
||||
local git=$(__lazy_git_ps1)
|
||||
|
||||
if [ $err -ne 0 ]; then
|
||||
err="\[\033[$((COLUMNS - 4))G\033[01;31m\]${err}\[\033[0G\]"
|
||||
err="\033[s\033[$((COLUMNS - 4))G${err}\033[u"
|
||||
else unset err; fi
|
||||
|
||||
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[00m\]\$ " # shell sign
|
||||
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[00m\]\$ " # shell sign
|
||||
}
|
||||
PROMPT_COMMAND=__regenprompt
|
||||
|
||||
|
||||
1
etc/i3
Submodule
1
etc/i3
Submodule
Submodule etc/i3 added at c59f51a0a9
1
etc/nvim
Submodule
1
etc/nvim
Submodule
Submodule etc/nvim added at 6da6d4ffb9
Reference in New Issue
Block a user