From a1a948e673e2fc04039909b816e3e37f26575ad8 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 15 Jun 2018 15:23:26 -0400 Subject: [PATCH] bash_aliases: add prompt_preexec() (commented out for now) --- bash_aliases | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bash_aliases b/bash_aliases index 9ca51f4..22f9202 100644 --- a/bash_aliases +++ b/bash_aliases @@ -31,6 +31,11 @@ function ps-color() { echo "\[\033[${codes}m\]" } +#function prompt_preexec() +#{ +# false +#} + function prompt_ps1_git_branch() { local git_branch_out @@ -69,7 +74,13 @@ function prompt_ps1_svn_branch() fi } -# Set PS1 to use the above functions +# Catch an enter keypress and call our preexec function. +#bind -x '"\M-\C-h1": prompt_preexec' +#bind '"\M-\C-h2": accept-line' +#bind '"\C-j": "\M-\C-h1\M-\C-h2"' +#bind '"\C-m": "\M-\C-h1\M-\C-h2"' + +# Set PS1 to use the above functions. if [[ "${USER}" == "root" ]]; then PS1="$(ps-color bold red)\u@\H$(ps-color bold green) [\w]$(ps-color bold magenta) \d \t $(ps-color bold blue)(\j)\n\$ $(ps-color reset)" else