Keep the Snippet Simple
I took a quick step back when too many parentheses started showing up. If you question the complexity of your quick snippet, you are probably right that there is a much simpler way to do things.
I wanted to get a trimmed message of the results of
git status -s.
As I worked on this snippet, I realized it was becoming way overcomplicated. 😆
I knew my experimentation was going down the wrong road, so I took a quick step back to see what someone else did. Sure enough, Stack Overflow provided me a snippet.
Moral of the story… there’s always someone smarter on Stack Overflow. 😆