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

Default for the $COLUMNS #111

Open
bas081 opened this issue May 27, 2023 · 4 comments
Open

Default for the $COLUMNS #111

bas081 opened this issue May 27, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@bas081
Copy link

bas081 commented May 27, 2023

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.

@BalurPoco
Copy link

I have the same error when run 'chatgpt -p "Text"' or 'echo "Text" | chatgpt'.

@bas081
Copy link
Author

bas081 commented May 27, 2023

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

@0xacx 0xacx added the bug Something isn't working label May 30, 2023
@gtoravan
Copy link

gtoravan commented Mar 5, 2024

@BalurPoco Solved it by using at the start export COLUMNS=80

@dnsang
Copy link

dnsang commented Jun 18, 2024

I just encountered the same issue. so I quickly updated it and sent the PR here: #162
please help review if it resolves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants