mirror of
https://github.com/0xacx/chatGPT-shell-cli.git
synced 2024-11-24 11:25:31 +00:00
Rename to multiline prompt
This commit is contained in:
parent
0a1ca89e6c
commit
3236de2f23
10
chatgpt.sh
10
chatgpt.sh
@ -267,8 +267,8 @@ while [[ "$#" -gt 0 ]]; do
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-b | --big-prompt)
|
||||
BIG_PROMPT=true
|
||||
--multi-line-prompt)
|
||||
MULTI_LINE_PROMPT=true
|
||||
shift
|
||||
;;
|
||||
-c | --chat-context)
|
||||
@ -292,10 +292,10 @@ MAX_TOKENS=${MAX_TOKENS:-1024}
|
||||
MODEL=${MODEL:-gpt-3.5-turbo}
|
||||
SIZE=${SIZE:-512x512}
|
||||
CONTEXT=${CONTEXT:-false}
|
||||
BIG_PROMPT=${BIG_PROMPT:-false}
|
||||
MULTI_LINE_PROMPT=${MULTI_LINE_PROMPT:-false}
|
||||
|
||||
# create our temp file for multi-line input
|
||||
if [ $BIG_PROMPT = true ]; then
|
||||
if [ $MULTI_LINE_PROMPT = true ]; then
|
||||
USER_INPUT=$(mktemp)
|
||||
trap 'rm -f ${USER_INPUT}' EXIT
|
||||
fi
|
||||
@ -323,7 +323,7 @@ fi
|
||||
while $running; do
|
||||
|
||||
if [ -z "$pipe_mode_prompt" ]; then
|
||||
if [ $BIG_PROMPT = true ]; then
|
||||
if [ $MULTI_LINE_PROMPT = true ]; then
|
||||
echo -e "\nEnter a prompt: (Press Enter then Ctrl-D to send)"
|
||||
cat >"${USER_INPUT}"
|
||||
prompt=$(sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g' "${USER_INPUT}")
|
||||
|
Loading…
Reference in New Issue
Block a user