0xacx / chatGPT-shell-cli

Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required.
https://gptshell.cc
MIT License
1.11k stars 157 forks source link

Why bash? wouldn't sh be enough? #67

Closed jaromil closed 1 year ago

jaromil commented 1 year ago

The script is still small enough to migrate to /bin/sh without much effort, leading to a more portable script. I would suggest you do so.

0xacx commented 1 year ago

What would the advantages be in practice? I mean, what modern system does not support bash but supports sh? The only case I could think of is running this script in alpine linux images, where bash is not included, but even there it can be easily installed. In short, I don't see the reason to restrict to sh functionality for benefits that are not clear to me. @jaromil Lmk what you think!

Zeioth commented 1 year ago

@jaromil What is failing on your end? Could you give more detail? It works fine on my end on all zsh, bash, and sh.

jaromil commented 1 year ago

Nothing failing! I have been scripting a lot in zsh and bash, nowadays I wish it would have been all in sh: portable and easier to analyse with stuff like shellcheck. Also BSD systems have native support without installing anything else.

0xacx commented 1 year ago

@jaromil I agree with that but don't you miss some bash functionality that sh doesn't have? A short list of the most important points is here I like and use some of these features in this script.