GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Me: What are some good names for an option for a CLI script which means "fail with a non-zero exit code if an HTTP error occurs" ChatGPT: --fail-on-http-error -e (for "error") --stop-on-http-error --exit-on-http-error --http-fail -H (for "HTTP") Me: Are there any commands like "curl" that have an option like this? List the commands and their options ChatGPT: Yes, there are several commands like curl that have an option to fail with a non-zero exit code when an HTTP error occurs. Some examples include: curl: -f, --fail wget: --no-clobber httpie: --fail http (from httpie): --fail These commands also have --silent,--show-error, -S options which make them not output anything to stdout, these options also make them fail with a non-zero exit code if an HTTP error occurs.

Download link

https://cdn.masto.host/fedisimonwillisonnet/media_attachments/files/109/765/386/498/815/817/original/ed8de0c1de68ec89.png

Notices where this attachment appears

  1. Embed this notice
    Simon Willison (simon@fedi.simonwillison.net)'s status on Saturday, 28-Jan-2023 17:01:41 JST Simon Willison Simon Willison

    ChatGPT is really useful to help design CLI tools. I wanted to add a new option that meant "fail with a non-zero exit code if the tool sees an HTTP 4xx or 5xx error", so I had a quick conversation with ChatGPT to come up with "--fail" as a good name for that option, consistent with other tools.

    In conversation Saturday, 28-Jan-2023 17:01:41 JST from fedi.simonwillison.net permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.