News for hackers. Stuff that matters.
Re:Test, [, and [[ (2020) by pavlov on Thursday November 23, 2023 @01:52AM (#38390117)
Writing bash scripts seems like the ideal use case for Chat-GPT style programming.

The programs are fairly short, examples are common in the corpus, and the syntax and execution model are so inscrutable that only a machine can pretend to understand what’s going on.

Re:Test, [, and [[ (2020) by saagarjha on Thursday November 23, 2023 @03:45AM (#38390765)
I tried doing this and it made a bunch of mistakes with handing spaces and whatnot that makes shell scripts often brittle. Of course, a human would probably make the same mistakes, because who actually knows how to do that correctly? But it doesn’t really make me comfortable using it for anything but the smallest of automation tasks.
Re:Test, [, and [[ (2020) by account42 on Thursday November 23, 2023 @07:30AM (#38392053)
> who actually knows how to do that correctly?

Many people. It's not exactly rocket science to quote your arguments which already gets you most of the way there.

Re:Test, [, and [[ (2020) by croo on Thursday November 23, 2023 @01:58AM (#38390160)
I already tried to customize my command line prompt with it. All the arcane colouring character decodings and random character escaping missions became a "put git branch names in parenthesis and make it cyan".
Re:Test, [, and [[ (2020) by db48x on Thursday November 23, 2023 @02:09AM (#38390229)
What’s so arcane about `echo "$(tput setaf 6)cyan$(tput sgr0)"`?
Re:Test, [, and [[ (2020) by croo on Thursday November 23, 2023 @02:47PM (#38396727)
Uh we must be using different prompts. I'm talking about this: export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
Re:Test, [, and [[ (2020) by db48x on Thursday November 23, 2023 @03:07PM (#38396947)
export PS1="\u@\h \[$(tput setaf 7)\]\w\[$(tput setaf 8)\]\$(parse_git_branch)\[$(tput sgr0)\] $ "
Re:Test, [, and [[ (2020) by spullara on Thursday November 23, 2023 @02:05AM (#38390204)
Re:Test, [, and [[ (2020) by rjblackman on Thursday November 23, 2023 @02:06AM (#38390208)
yes, this is the best use case I have found for chat gpt. I've been automating away all of my little annoyances with powershell.