bath update

This commit is contained in:
2026-08-18 15:57:16 +02:00
parent a9bd70c482
commit 3344ba2ad0
17 changed files with 91 additions and 218 deletions
+2 -1
View File
@@ -12,4 +12,5 @@ bind -m vi-command 'Control-l: clear-screen'
bind -m vi-insert 'Control-l: clear-screen'
# export MANPAGER="/bin/sh -c \"sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | vim --appimage-extract-and-run --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\""
export MANPAGER="vim --appimage-extract-and-run +MANPAGER --not-a-term -c 'set ts=8 nolist number' -"
alias cat=/usr/local/bin/vimcat
/usr/local/bin/vimcat --version &>/dev/null && \
alias cat=/usr/local/bin/vimcat
+2
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
#source /home/linuxbrew/.linuxbrew/share/undo/undo.bash
[[ "$-" != *i* ]] && return
export HISTCONTROL="ignoreboth:erasedups"
+21 -16
View File
@@ -5,46 +5,51 @@
shopt -s checkwinsize
# Color support for ls and other tools
if [ -x /usr/bin/dircolors ]; then
if [[ -x /usr/bin/dircolors ]]; then
if [[ -r "$HOME/.dircolors" ]]; then
eval "$(dircolors -b "$HOME/.dircolors")" 2>/dev/null || true
else
eval "$(dircolors -b)" 2>/dev/null || true
fi
fi
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
grep --color=auto < /dev/null &>/dev/null && \
alias grep='grep --color=auto'
alias diff='diff --color=auto'
[[ -x /usr/bin/lesspipe ]] && eval "$(SHELL=/bin/sh lesspipe)" # make less more friendly for non-text input files, see lesspipe(1)
[[ -x /usr/bin/lesspipe ]] && \
eval "$(SHELL=/bin/sh lesspipe)" # make less more friendly for non-text input files, see lesspipe(1)
export LS_COLORS="$LS_COLORS:tw=01;04;34:ow=01;04;34:"
alias ls='ls --color=auto -pQFh --group-directories-first'
if ls --color=auto /dev/null &>/dev/null; then
alias ls='ls --color=auto -pQFh --group-directories-first'
else
alias ls='ls -pQFhG'
fi
[[ "$-" != *i* ]] && return
updatePrompt() {
updatePrompt() { # ✓ ≡1 At 12:28 by jaandrle in ~/Dokumenty/Projekty
local -r prev_exit="$?"
# color_helper_>>color<< (Note: \[\]= escaping)
local -r chRst="\[\033[0m\]" #white
local -r chR="\[\033[1;91m\]" #red
local -r chW="\[\033[00m\]" #white
local -r chG="\[\033[01;32m\]" #green
local -r chB="\[\033[0;34m\]" #blue
local -r chP="\[\033[0;35m\]" #purple
local -r chY="\[\033[0;33m\]" #yellow
PS1=""
if [ "$prev_exit" -eq 0 ]; then
PS1+="$chG $chW"
PS1+="$chG$chRst"
else
PS1+="$chR $chW"
PS1+="$chR$chRst"
fi
PS1+=" "
local jobs
jobs=$(jobs -p | wc -w)
[[ "$jobs" -ne 0 ]] && PS1+="${chY}${jobs}${chW}"
[[ "$jobs" -ne 0 ]] && PS1+="${chY}\j${chRst}"
PS1+="${debian_chroot:+($debian_chroot)}"
PS1+=" At ${chG}\A${chW}"
PS1+=" by ${chP}\u${chW}"
PS1+=" At ${chG}\A${chRst}"
PS1+=" by ${chP}\u${chRst}"
if sudo -n true 2>/dev/null; then
PS1+="${chR} (sudo)${chW}"
PS1+="${chR} (sudo)${chRst}"
fi
PS1+=" in "
local -r git='command git'
@@ -56,10 +61,10 @@ updatePrompt() {
status="$($git for-each-ref --format='%(upstream:trackshort)' "$branch" 2>/dev/null | awk '!seen[$1]++ {printf $1}')"
status+="$($git status --porcelain 2>/dev/null | awk '!seen[$1]++ {printf $1}')"
[ "$status" != "" ] && \
PS1+="|$chY$status$chW"
PS1+="|$chY$status$chRst"
PS1+="] "
fi
PS1+="${chB}\w${chW}"
PS1+="${chB}\w${chRst}"
PS1+="\n${PS1_jaaENV:-:}"
local -r hook="$BASH_DOTFILES/hooks/onprompt"