Skip to content

Commit

Permalink
Test bash normal without pureline
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbruno committed Oct 10, 2023
1 parent 112ee2e commit 9e47abe
Showing 1 changed file with 87 additions and 70 deletions.
157 changes: 87 additions & 70 deletions usr/share/biglinux/bash-config/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,76 +13,56 @@ case $- in
esac

# Load Blesh for enhanced interactive shell experience
if [[ -f /usr/share/blesh/ble.sh ]] && [[ ! -f ~/.bash-disable-blesh ]]; then
if [[ -f /usr/share/blesh/ble.sh ]] && [[ ! -f ~/.bash-normal ]]; then
source /usr/share/blesh/ble.sh --noattach
fi

# ----- History Configuration -----
HISTCONTROL=ignoreboth # Prevent saving commands that start with a space and duplicates
shopt -s histappend # Append history rather than overwrite
HISTSIZE=1000 # Store up to 1000 commands in memory
HISTFILESIZE=2000 # Store up to 2000 commands in history file
shopt -s checkwinsize # Automatically adjust window size after each command

# ----- Color Support & Aliases -----
# Enable color support and set related aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
fi

if [ ! -f ~/.bash-disable-colors ]; then
# GRC Configuration for colorizing command outputs
# GRC_ALIASES=true
# GRC="/usr/bin/grc"
# if tty -s && [ -n "$TERM" ] && [ "$TERM" != "dumb" ] && [ -n "$GRC" ]; then
# alias colourify="$GRC -es"
# alias blkid='colourify blkid'
# alias configure='colourify ./configure'
# alias df='colourify df'
# alias diff='colourify diff'
# alias docker='colourify docker'
# alias docker-compose='colourify docker-compose'
# alias docker-machine='colourify docker-machine'
# alias du='colourify du'
# alias env='colourify env'
# alias free='colourify free'
# alias fdisk='colourify fdisk'
# alias findmnt='colourify findmnt'
# alias make='colourify make'
# alias gcc='colourify gcc'
# alias g++='colourify g++'
# alias id='colourify id'
# alias ip='colourify ip'
# alias iptables='colourify iptables'
# alias as='colourify as'
# alias gas='colourify gas'
# # alias journalctl='colourify journalctl'
# alias kubectl='colourify kubectl'
# alias ld='colourify ld'
# # alias ls='colourify ls'
# alias lsof='colourify lsof'
# alias lsblk='colourify lsblk'
# alias lspci='colourify lspci'
# alias netstat='colourify netstat'
# alias ping='colourify ping'
# alias ss='colourify ss'
# alias traceroute='colourify traceroute'
# alias traceroute6='colourify traceroute6'
# alias head='colourify head'
# alias tail='colourify tail'
# alias dig='colourify dig'
# alias mount='colourify mount'
# alias ps='colourify ps'
# alias mtr='colourify mtr'
# alias semanage='colourify semanage'
# alias getsebool='colourify getsebool'
# alias ifconfig='colourify ifconfig'
# alias sockstat='colourify sockstat'
# fi
#GRC Configuration for colorizing command outputs
#GRC_ALIASES=true
#GRC="/usr/bin/grc"
#if tty -s && [ -n "$TERM" ] && [ "$TERM" != "dumb" ] && [ -n "$GRC" ]; then
# alias colourify="$GRC -es"
# alias blkid='colourify blkid'
# alias configure='colourify ./configure'
# alias df='colourify df'
# alias diff='colourify diff'
# alias docker='colourify docker'
# alias docker-compose='colourify docker-compose'
# alias docker-machine='colourify docker-machine'
# alias du='colourify du'
# alias env='colourify env'
# alias free='colourify free'
# alias fdisk='colourify fdisk'
# alias findmnt='colourify findmnt'
# alias make='colourify make'
# alias gcc='colourify gcc'
# alias g++='colourify g++'
# alias id='colourify id'
# alias ip='colourify ip'
# alias iptables='colourify iptables'
# alias as='colourify as'
# alias gas='colourify gas'
# # alias journalctl='colourify journalctl'
# alias kubectl='colourify kubectl'
# alias ld='colourify ld'
# # alias ls='colourify ls'
# alias lsof='colourify lsof'
# alias lsblk='colourify lsblk'
# alias lspci='colourify lspci'
# alias netstat='colourify netstat'
# alias ping='colourify ping'
# alias ss='colourify ss'
# alias traceroute='colourify traceroute'
# alias traceroute6='colourify traceroute6'
# alias head='colourify head'
# alias tail='colourify tail'
# alias dig='colourify dig'
# alias mount='colourify mount'
# alias ps='colourify ps'
# alias mtr='colourify mtr'
# alias semanage='colourify semanage'
# alias getsebool='colourify getsebool'
# alias ifconfig='colourify ifconfig'
# alias sockstat='colourify sockstat'
#fi

# Color settings for GCC outputs
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
Expand All @@ -107,6 +87,23 @@ if [ ! -f ~/.bash-disable-colors ]; then
fi
fi

# ----- History Configuration -----
HISTCONTROL=ignoreboth # Prevent saving commands that start with a space and duplicates
shopt -s histappend # Append history rather than overwrite
HISTSIZE=1000 # Store up to 1000 commands in memory
HISTFILESIZE=2000 # Store up to 2000 commands in history file
shopt -s checkwinsize # Automatically adjust window size after each command

# ----- Color Support & Aliases -----
# Enable color support and set related aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
fi

# More ls aliases
alias ll='ls -l'
alias la='ls -A'
Expand Down Expand Up @@ -139,4 +136,24 @@ if [ -f /usr/share/fzf/key-bindings.bash ]; then
fi

# Attach Blesh if available
[[ ${BLE_VERSION-} ]] && ble-attach
if [[ ${BLE_VERSION-} ]]; then
ble-attach
else
greenBg="\[\e[48;5;34m\]"
greenFg="\[\e[38;5;34m\]"

blackFg="\[\e[30m\]"
whiteFg="\[\e[37m\]"

# Reset
fmtReset="\[\e[0m\]"

systemBg="\[\e[48;5;237m\]"
systemFg="\[\e[38;5;237m\]"

nameBg="\[\e[48;5;248m\]"
nameFg="\[\e[38;5;248m\]"

# one line PS1
PS1="$systemBg$greenFg$systemFg$greenBg$blackFg$greenBg\w $fmtReset$greenFg$fmtReset "
fi

0 comments on commit 9e47abe

Please sign in to comment.