BuilderIO / ai-shell

A CLI that converts natural language to shell commands.
MIT License
4.08k stars 261 forks source link

zsh weird error #14

Closed ZeldOcarina closed 1 year ago

ZeldOcarina commented 1 year ago

Sorry to open two issues but maybe you'd like to know.

I've done all the installation steps and I get a version out of the software, I've set the API key etc. but I get this zsh error, or a 429 on the list prompt as stated on the other issue.

Thanks for your help!!

image

AlaEddineBoughanmmi commented 1 year ago

zsh is interpreting the ? in the prompt as a globbing wildcard

To prevent this wrap the prompt in quotes: "what is my ip address?"

image

you can also use the noglob.

image

steve8708 commented 1 year ago

ah! I should add this to the readme, that a safer way if you want to use special chars that can be handled by various shells to put it in quotes

another option is to use an alias like the copilot CLI:

### Setup alias convenience commands 

You can run GitHub Copilot CLI directly using `github-copilot-cli`, but we recommend you install the `??`, `git?`, and `gh?`  commands in your shell.
These are not only more convenient to type, but also [provide added features](#whats-the-point-of-the-eval-and-alias- stuff).
To install them, run the following command:

```bash
eval "$(github-copilot-cli alias -- "$0")"
```

perhaps we should update the readme accordingly. interested in contributing a PR to the readme?

steve8708 commented 1 year ago

added a quick note to the readme, happy to take suggestions to improve it