top | item 45991725

(no title)

tomxor | 3 months ago

  ls | xargs -I % sh -c 'cd %; pwd; [[ $(git status -s) ]] && echo WIP || echo clean'

discuss

order

johnisgood|3 months ago

I really like your response and your approach to it; I would like to work with you. :P

I do not need a CLI tool. I can come up with a very simple script or even an one-liner (like you just did) to achieve what I want.

Worth noting that neovim shows some git status when editing a file inside a git repository, and there are ways to do the same from your shell.

FWIW, I think this project was vibe coded with an LLM, but if it works, it works, so it makes no difference to me. The only reason I mentioned it is that "vibe coding" is not inherently bad. I do not even like the term. If you "vibe code" without knowledge, then yeah, it is bad, just as bad as a shitty developer writing code is.

tomxor|3 months ago

Thanks :D I like working with people who appreciate simple solutions.

This sort of response to complex solutions used to be more prevalent on HN. When I got downvoted I was like "..this is the end isn't it" :P Maybe the unix way is a dying strategy IDK, but you give me hope.

> FWIW, I think this project was vibe coded with an LLM, but if it works, it works, so it makes no difference to me.

I did not realise that, I'd be far more worried about running it than most human coded projects out of fear of it doing something destructive. Not that humans don't make mistakes, but at least they have a mental model and intent. I suppose it depends on the definition of "vibe coded" I've heard some people talk about sending the LLM off into a loop and then trying to use the result, whereas if you are just using it as a more powerful autocomplete and playing captain then that's a lot better.

listeria|3 months ago

  sh: 1: [[: not found

tomxor|3 months ago

Forgot that was a bash feature..

  ls | xargs -I % bash -c 'cd %; pwd; [[ $(git status -s) ]] && echo WIP || echo clean'