Как я могу упростить следующий код, если заявления? Спасибо
function git_dirty { text=$(git status) changed_text="Changes to be committed" changes_not_staged="Changes not staged for commit" untracked_files="Untracked files" dirty=false if [[ $ = *"$changed_text"* ]];then dirty=true fi if [[ $ = *"$changes_not_staged"* ]];then dirty=true fi if [[ $ = *"$untracked_files"* ]];then dirty=true fi echo $dirty }