Prototype for trying out blesh
This commit is contained in:
+16
-9
@@ -36,6 +36,11 @@ if [ -f "$HOME/.private_functions" ] && [ -r "$HOME/.private_functions" ]; then
|
||||
. "$HOME/.private_functions"
|
||||
fi
|
||||
|
||||
if blesh-available; then
|
||||
# blesh-activate
|
||||
:
|
||||
fi
|
||||
|
||||
#{- PROMPT -}#
|
||||
|
||||
if which tput &> /dev/null && tput bold &> /dev/null; then
|
||||
@@ -90,7 +95,7 @@ if which direnv &> /dev/null; then
|
||||
PS1=${ORIG_PS1}
|
||||
fi
|
||||
}
|
||||
prompt_command_prepend update_prompt
|
||||
prompt_command_prepend "update_prompt"
|
||||
fi
|
||||
|
||||
# Continuation Prompt: "> " in cyan
|
||||
@@ -100,11 +105,14 @@ export PS4="${blue}#${no_color} "
|
||||
|
||||
#{- HISTORY -}#
|
||||
|
||||
prompt_command_prepend "history -r"
|
||||
prompt_command_prepend "history -c"
|
||||
prompt_command_prepend "history -w"
|
||||
prompt_command_prepend "history -n"
|
||||
# PROMPT_COMMAND="echo hist1; history; history -n; echo hist2; history; history -w; echo hist3; history; history -c; echo hist4; history; history -r; echo hist5; history; $PROMPT_COMMAND"
|
||||
if blesh-attached; then
|
||||
bleopt history_share=1
|
||||
else
|
||||
prompt_command_prepend "history -r"
|
||||
prompt_command_prepend "history -c"
|
||||
prompt_command_prepend "history -w"
|
||||
prompt_command_prepend "history -n"
|
||||
fi
|
||||
export HISTFILE="$HOME/.history/bash"
|
||||
export HISTTIMEFORMAT="%F %T "
|
||||
export HISTCONTROL="erasedups:ignoreboth"
|
||||
@@ -133,7 +141,6 @@ log_bash_persistent_history()
|
||||
|
||||
prompt_command_prepend "log_bash_persistent_history"
|
||||
|
||||
|
||||
# Source bash completion, this file will then lazy load all other completions
|
||||
source_completions() {
|
||||
if [ -r "/usr/share/bash-completion/bash_completion" ]; then
|
||||
@@ -159,8 +166,8 @@ preserve_xtrace_reset() {
|
||||
fi
|
||||
} 2>/dev/null
|
||||
|
||||
prompt_command_prepend preserve_xtrace
|
||||
prompt_command_append preserve_xtrace_reset
|
||||
prompt_command_prepend "preserve_xtrace"
|
||||
prompt_command_append "preserve_xtrace_reset"
|
||||
|
||||
if $(which direnv &> /dev/null); then
|
||||
# Only if direnv isn't already defined in our prompt_command
|
||||
|
||||
Reference in New Issue
Block a user