From 5319e2de687a7f0d8243be3390228b59ae5536d1 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Thu, 31 Oct 2019 01:44:07 +0100 Subject: [PATCH] Remove bashrc prefix from functions --- dotfiles/.bashrc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index f9b4ef6..3183a9e 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -101,8 +101,8 @@ GIT_PS1_SHOWUNTRACKEDFILES=1 GIT_PS1_SHOWUPSTREAM=verbose PS2="... " -PROMPT_COMMAND=bashrc_set_prompt -bashrc_set_prompt() { +PROMPT_COMMAND=_set_prompt +_set_prompt() { local exit_code=$? prompt=$(printf '\$%.0s' $(seq 1 $SHLVL)) pyvenv="" if ! [ -z "$VIRTUAL_ENV" ]; then @@ -186,16 +186,16 @@ alias myip="curl https://ifconfig.co" #alias myip="curl https://ifconfig.me" #alias myip="dig +short myip.opendns.com @resolver1.opendns.com" -alias light='bashrc_update_colors light' -alias dark='bashrc_update_colors dark' +alias light='_update_colors light' +alias dark='_update_colors dark' -bashrc_send_osc() { +_send_osc() { local OSC="\E]" ST="\E\\" if [ -n "$TMUX" ]; then OSC="\EPtmux;\E\E]"; fi echo -ne "$OSC$1$ST" } -bashrc_update_colors() { +_update_colors() { export BACKGROUND="$1" local cursor=$Red_RGB fg=$Base1_RGB bg=$Base03_RGB @@ -204,7 +204,7 @@ bashrc_update_colors() { local n rgb comment if [ -n "$ITERM_SESSION_ID" ] then # iTerm2 - while read n rgb comment; do bashrc_send_osc "P$n$rgb"; done <