Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Ctrl-D to exit like bash, Use Ctrl-C to cancel input #127

Open
Freed-Wu opened this issue Jul 14, 2023 · 3 comments · May be fixed by #128
Open

Use Ctrl-D to exit like bash, Use Ctrl-C to cancel input #127

Freed-Wu opened this issue Jul 14, 2023 · 3 comments · May be fixed by #128

Comments

@Freed-Wu
Copy link

TIA!

@Freed-Wu
Copy link
Author

Currenly, this program detect input and if input is exit, it will exit. However, it limit its usage. which make it even cannot be a translator:

> Please translate the following word to Chinese, just input Chinese.

Sure, please provide the word or phrase you would like me to translate to Chinese.

> hello

你好 (nǐ hǎo)

> exit

退出 (tuìchū)

I suggest give up the function exit/q to exit, just use C-D to replace it. The name of this program is ChatGPT-shell, Why not make it like a true bash?

Freed-Wu added a commit to Freed-Wu/chatGPT-shell-cli that referenced this issue Jul 14, 2023
@Freed-Wu Freed-Wu linked a pull request Jul 14, 2023 that will close this issue
Freed-Wu added a commit to Freed-Wu/chatGPT-shell-cli that referenced this issue Jul 14, 2023
Freed-Wu added a commit to Freed-Wu/chatGPT-shell-cli that referenced this issue Jul 14, 2023
Freed-Wu added a commit to Freed-Wu/chatGPT-shell-cli that referenced this issue Jul 14, 2023
@mountaineerbr
Copy link

Well, did you check the big prompt option?

  -b, --big-prompt           Allow multi-line prompts during chat mode

It can be improved, of course. Instead of using the cat command, there is some things you can do to use bash readline with read command. My chatgpt.sh wrapper is probably too code-spaghetty to be readable but multiline input can be implemented in various ways.

@martin-bernholc
Copy link

I'm not sure if i'm using the option properly but when asking chatgpt it tells me the same thing that option isn't properly "mapped".

chatgpt

Yes, there is a bug in the script. The bug is in the section where the script checks for the --big-prompt option. The
script incorrectly uses the --big-prompt option instead of the correct option --multi-line-prompt . To fix the bug, you
need to replace all occurrences of --big-prompt with --multi-line-prompt in the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants