Install oh-my-posh only if necessary

This commit is contained in:
Manuel Thalmann 2023-04-05 11:11:09 +02:00
parent 97e5b6a33c
commit b772868f73

View file

@ -1,3 +1,10 @@
#!/bin/bash
echo 'eval "$(oh-my-posh init bash --config ~/.omp/manuel.omp.json)"' \
| tee -a ~/.bashrc;
if ! grep "\boh-my-posh\b" ~/.bashrc
then
{
echo "";
echo "# Oh My Posh!";
echo 'eval "$(oh-my-posh init bash --config ~/.omp/manuel.omp.json)"'
} | tee -a ~/.bashrc;
fi;