diff --git a/.bash_aliases b/.bash_aliases index fb0ff4f..14a3ab3 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -1,10 +1,23 @@ -# Define color variables -RED='\033[0;31m' -YELLOW='\033[0;33m' -CYAN='\033[0;36m' -GREEN='\033[1;32m' -NC='\033[0m' # No Color -BOLD='\033[1m' +# Basic Colors +BLACK=$'\e[30m' +RED=$'\e[31m' +GREEN=$'\e[32m' +YELLOW=$'\e[33m' +BLUE=$'\e[34m' +MAGENTA=$'\e[35m' +CYAN=$'\e[36m' +WHITE=$'\e[37m' + +# Styles +BOLD=$'\e[1m' +ITALIC=$'\e[3m' +UNDERLINE=$'\e[4m' +BLINK=$'\e[5m' # May not work in all terminals +INVERT=$'\e[7m' # Invert foreground/background +STRIKE=$'\e[9m' # Strikethrough + +# Reset +NC=$'\e[0m' # Reset all styles/colors # Functions to store messages echo_error() { @@ -26,6 +39,8 @@ echo_info() { alias sudo="sudo -E" alias please="sudo" +alias whoami="command echo 'Ghost in a shell..'" + # ─< easier dir up >──────────────────────────────────────────────────────────────────────── alias ..="cd .." diff --git a/.bashrc b/.bashrc index 052e845..32e638f 100644 --- a/.bashrc +++ b/.bashrc @@ -1,4 +1,9 @@ #!/usr/bin/env bash +[[ $- == *i* ]] && source /usr/share/blesh/ble.sh --noattach +# Enable history expansion (!!, !$, etc.) in ble.sh +bleopt history_expand_on_space=1 +# Make Tab expand history references (!!, !$, etc.) +ble-bind -f 'TAB' 'complete/expand-history' # ─< Helper functions >───────────────────────────────────────────────────────────────── # ───────────────────────────────────< Message storage >───────────────────────────────── declare -A _MESSAGES @@ -304,3 +309,4 @@ main() { } main +[[ ! ${BLE_VERSION-} ]] || ble-attach