Install oh-my-posh only if necessary

This commit is contained in:
Manuel Thalmann 2023-04-05 11:11:09 +02:00
parent ba1a48dc80
commit 0c6dc46f7c

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;