Open bas081 opened 1 year ago
I have the same error when run 'chatgpt -p "Text"' or 'echo "Text" | chatgpt'.
I like the idea of this project but it does not cover my use-cases that well. I wrote something much simpler in bash that works for me. Maybe it helps this project or others: https://gist.github.com/bas080/2268473a12af12320d366b9dce7a0f6a
@BalurPoco Solved it by using at the start export COLUMNS=80
I just encountered the same issue. so I quickly updated it and sent the PR here: https://github.com/0xacx/chatGPT-shell-cli/pull/162 please help review if it resolves the problem.
Some shells don't have the COLUMNS defined in certain cases.
This makes fold error:
fold: invalid number of columns: ‘’
A sane default would be appreciated. Either really big or a standard width 80.
Simply changing
$COLUMNS
->${COLUMNS:-80}
would be an improvement.