walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
587 stars 17 forks source link

error: cannot spawn sh: No such file or directory #144

Closed ghost closed 10 months ago

ghost commented 10 months ago

If I do this, everything works fine:

> git config core.pager moar
> git tag

but if I do this, I get an error:

> git config core.pager 'moar -no-clear-on-exit'
> git tag
error: cannot spawn sh: No such file or directory
walles commented 10 months ago

Set the environment variable export MOAR=-no-clear-on-exit globally, then git config core.pager moar.

moar reads config from that environment variable.

walles commented 10 months ago

Or even better, do both of these and don't touch git's config:

That will make others use moar as well for their paging, not just git.

And it opens up for using riff as well :).

ghost commented 10 months ago

OK yes both ideas work, thank you!

walles commented 10 months ago

If you ever look at git diffs in the terminal, you really should try riff to make your diffs more readable: https://github.com/walles/riff

riff