From 3e513c852f7f5978004a89ea89f0bc154dc65534 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Thu, 12 Jan 2023 23:59:23 +0000 Subject: [PATCH] Update file run_onchange_after_94-bash-it.tmpl --- .../universal/run_onchange_after_94-bash-it.tmpl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.tmpl index 72ab363c..fa01a1b2 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_94-bash-it.tmpl @@ -1,5 +1,5 @@ {{- if (ne .host.distro.family "windows") -}} -#!/usr/bin/env bash +#!/usr/bin/env bash -i {{ includeTemplate "universal/profile" }} {{ includeTemplate "universal/logg" }} @@ -10,7 +10,7 @@ if ! command -v powerline > /dev/null; then fi ### Bash-it completions / plugins -if command -v powerline > /dev/null; then +if command -v powerline > /dev/null && [ -f "$HOME/.bashrc" ]; then logg info 'Running `source ~/.bashrc`' source ~/.bashrc logg success 'Imported the `~/.bashrc` profile' @@ -28,7 +28,11 @@ if command -v powerline > /dev/null; then logg warn '`bash-it` is not available' fi else - logg warn '`powerline` is not available' + if ! command -v powerline > /dev/null; then + logg warn '`powerline` is not available' + else + logg warn '`~/.bashrc` is missing' + fi fi {{ end -}}