Code Monkey home page Code Monkey logo

Comments (7)

adrienthiery avatar adrienthiery commented on June 1, 2024 1

I actually found a workaround, which is to edit :
~/.config/cheat/conf.yml

and set a pager: as described in the comment:

# Through which pager should output be piped?
# 'less -FRX' is recommended on Unix systems
# 'more' is recommended on Windows
- pager: PAGER_PATH
+ pager: less -FRX

But thought it would be interesting to report.

Is it just my machine where PAGER_PATH is not defined by default?
Or should cheat have a default value there?

from cheat.

chrisallenlane avatar chrisallenlane commented on June 1, 2024

Hi, @adrienthiery

Thanks for the bug report, and I'm sorry for the embarrassingly long delay in getting back to you.

If by chance you remember, do you know if you ran the "installer" after installing via brew? If you did not have a config file present on your machine, you should have been prompted with the following:

A config file was not found. Would you like to create one now? [Y/n]

If you choose n there, I believe you'd encounter the problem that you've described.

For context, PAGER_PATH is a template literal that is replaced by the installer:
https://github.com/cheat/cheat/blob/master/internal/installer/run.go#L29

You're correct that editing the configuration file by hand will solve the problem.

As an aside, if you're wondering why the default isn't less or more or something, that used to be the case, but I've found that neither is available on all supported platforms, so I think we might be stuck with the correct (admittedly cumbersome) solution.

Sorry once again for the delay. Thanks.

from cheat.

chrisallenlane avatar chrisallenlane commented on June 1, 2024

I'm going to close this for now to remove noise from the issue-tracker, but please feel free to re-open it if you think there's more to discuss. Thanks.

from cheat.

adrienthiery avatar adrienthiery commented on June 1, 2024

I do think I used brew to install, but I don't remember a prompt.
But I did have a conf file, so maybe there was a bug during install that omitted the PAGER_PATH replacement?

Anyway, it's been working well ever since :)

from cheat.

chrisallenlane avatar chrisallenlane commented on June 1, 2024

But I did have a conf file, so maybe there was a bug during install that omitted the PAGER_PATH replacement?

It's entirely possible. I vaguely remember having installer issues a while ago.

Anyway, it's been working well ever since :)

Glad to hear! I'll consider this solved for now, but I'll keep an eye open for similar issues in the future.

Thanks!

from cheat.

4rc0s avatar 4rc0s commented on June 1, 2024

I just had this happen on macOS (with cheat installed via homebrew some time ago). I did just upgrade to Sonoma, but that may be unrelated. Editing conf.yml manually as described above fixed the issue. Looks like the template literals weren't replaced by the installer or were reinstalled during an update.

from cheat.

chrisallenlane avatar chrisallenlane commented on June 1, 2024

@4rc0s, thanks for the input. I've re-opened the issue.

from cheat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.