From 57e1eca4a123a55ee24d17f7dd4eec6b8a96e88c Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 5 Apr 2023 11:14:49 +0200 Subject: [PATCH] Only register oh-my-posh if necessary --- scripts/Common/Config/bash/oh-my-posh.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/Common/Config/bash/oh-my-posh.sh b/scripts/Common/Config/bash/oh-my-posh.sh index 6ee4f0f7..78c95fb3 100755 --- a/scripts/Common/Config/bash/oh-my-posh.sh +++ b/scripts/Common/Config/bash/oh-my-posh.sh @@ -1,10 +1,11 @@ #!/bin/bash -if ! grep "\boh-my-posh\b" ~/.bashrc +if ! grep "\boh-my-posh\b" ~/.bashrc > /dev/null then { echo ""; echo "# Oh My Posh!"; echo 'eval "$(oh-my-posh init bash --config ~/.omp/manuel.omp.json)"' - } | tee -a ~/.bashrc; + echo 'eval "$(oh-my-posh completion bash)"'; + } | tee -a ~/.bashrc > /dev/null; fi;