Only register oh-my-posh if necessary

This commit is contained in:
Manuel Thalmann 2023-04-05 11:14:49 +02:00
parent 0c6dc46f7c
commit 57e1eca4a1

View file

@ -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;