mirror of
https://codeberg.org/frosty/dotfiles.git
synced 2024-09-19 11:47:09 -04:00
fix issues related to the prompt
This commit is contained in:
parent
ed19c1a086
commit
68bb4189bd
|
@ -10,8 +10,9 @@ HISTFILESIZE=100000
|
||||||
export HISTCONTROL="ignoredups"
|
export HISTCONTROL="ignoredups"
|
||||||
|
|
||||||
git_branch() {
|
git_branch() {
|
||||||
|
# shellcheck disable=SC2063
|
||||||
branch=$(git branch 2>/dev/null | grep '^*' | colrm 1 2)
|
branch=$(git branch 2>/dev/null | grep '^*' | colrm 1 2)
|
||||||
if [ ! -z "$branch" ]; then
|
if [ -n "$branch" ]; then
|
||||||
if [ -n "$(git status --porcelain)" ]; then
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
color="31" # Red for changes
|
color="31" # Red for changes
|
||||||
elif [ "$(git stash list)" ]; then
|
elif [ "$(git stash list)" ]; then
|
||||||
|
@ -23,8 +24,9 @@ git_branch() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
PS1='\[\e[1;32m\]\u@\h \[\e[1;34m\]\w \[\e[1;33m\]\$(git_branch) \[\e[0m\]\$ '
|
PS1="\[\e[1;32m\]\u@\h \[\e[1;34m\]\w \$(git_branch) \[\e[0m\]\$ "
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
[ -f "$XDG_CONFIG_HOME/shell/shortcuts" ] && . "$XDG_CONFIG_HOME/shell/shortcuts"
|
[ -f "$XDG_CONFIG_HOME/shell/shortcuts" ] && . "$XDG_CONFIG_HOME/shell/shortcuts"
|
||||||
|
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
|
@ -49,7 +51,7 @@ alias ll='ls -alF'
|
||||||
alias la='ls -A'
|
alias la='ls -A'
|
||||||
alias l='ls -CF'
|
alias l='ls -CF'
|
||||||
|
|
||||||
skinstall() {
|
skli() {
|
||||||
rm config.h
|
rm config.h
|
||||||
make || return
|
make || return
|
||||||
doas make install
|
doas make install
|
||||||
|
|
Loading…
Reference in a new issue