1
1
mirror of https://github.com/walles/moar.git synced 2024-09-19 07:58:00 +03:00
Commit Graph

100 Commits

Author SHA1 Message Date
Johan Walles
dc0243f9e3 Handle some warnings 2024-01-05 07:02:58 +01:00
Johan Walles
c70228207e Make the binary compile 2024-01-05 06:45:03 +01:00
Johan Walles
4167d6997f Highlight streams if we know the language 2024-01-03 10:41:53 +01:00
Johan Walles
cb07ce3d3a Tune --lang explanation 2024-01-02 15:43:33 +01:00
Johan Walles
cd2a8a9d09 Fix some error messages
After testing. The invalid value is already printed by the framework, no
need to include it in the error message.
2024-01-02 15:36:45 +01:00
Johan Walles
b7603ea026 Add a -lang option for input file language 2024-01-02 09:39:47 +01:00
Johan Walles
4e4d7fd923 Handle warnings in moar.go 2024-01-01 13:42:42 +01:00
Johan Walles
8ec3df792a Use "select" as a term for selecting text
This is a better term, as pointed out by @postsolar in #173
2023-12-19 09:20:02 +01:00
Johan Walles
d511e50652 Downsample colors to terminal palette
As neeed.

This enables you to view 24 bit color documents in a 256 color terminal.
With reduced quality obviously, but still.
2023-12-19 08:47:40 +01:00
Johan Walles
21afb4f2ef Don't track the formatter
They are only needed at startup, so let's not keep them around while
paging.
2023-12-17 16:09:29 +01:00
Johan Walles
f8c071a233 Print less compat env vars in usage message
If present. Would have been useful for troubleshooting in #170.
2023-12-17 07:47:14 +01:00
Johan Walles
4468a6528c Add command line options for setting the mouse mode 2023-12-15 21:36:29 +01:00
Johan Walles
8c4a133008 Add line numbers to escape sequence log messages 2023-11-13 08:50:37 +01:00
Johan Walles
b7f0e24fbf Default to --colors=auto 2023-10-06 22:13:26 +02:00
Johan Walles
251513ef66 Use plain style color for unclassified text
I believe this fixes #159.
2023-10-06 19:03:48 +02:00
Johan Walles
faafc49471 Accept +1234 argument in any place
Fixes the issue reported with PR #158:
https://github.com/walles/moar/pull/158#issue-1918313499
2023-09-29 22:42:41 +02:00
m3tav3rse
3e75780a92
Fix + flag handling
Currently only works for: moar file +123
2023-09-28 23:20:54 +02:00
Johan Walles
e21da3dabe Don't accept negative line numbers 2023-09-27 20:29:29 +02:00
Johan Walles
4bd2d70a53 Add support for +1234 command line option
Fixes #155.
2023-09-27 20:23:27 +02:00
Johan Walles
61f35db554 Avoid paging if screen setup fails
Instead, when screen setup fails, just pump our input (file or stream)
to stdout.

Fixes #149.
2023-08-27 14:52:08 +02:00
Johan Walles
574235bc03 Print log messages on panic()
Before this change, if moar...
1. Logged some messages
2. Panicked

... then only the panic() output would be printed and the log messages
would be lost.

With this change in place, both are printed.
2023-08-27 09:02:31 +02:00
Johan Walles
2a5b82fe81 Log start / end on trace level 2023-05-20 07:00:05 +02:00
Johan Walles
1d17d6f68f Parse --quit-if-one-screen command line flag 2023-05-18 09:27:50 +02:00
Johan Walles
2d028beb0d Use struct fields rather than anonymous parameters
For readability and lowered error-prone-ness.
2023-05-18 09:26:10 +02:00
Johan Walles
eafb70d790 Configurable side scroll amount
Using the new --shift command line flag.

Fixes #130.
2023-03-19 11:57:40 +01:00
Johan Walles
e21005d498 Improve comments 2023-03-02 07:22:32 +01:00
Johan Walles
e17e6bdac2 Make command line error messages more visible
Before this change I felt they just disappeared in the clutter from the
help text.
2023-03-02 07:17:05 +01:00
Johan Walles
5432ff567a Fix speling error 2023-03-02 07:06:10 +01:00
Johan Walles
b4541db00f Handle the scroll-sideways hints 2023-03-02 07:03:39 +01:00
Johan Walles
65ba59d136 Fix unprintable parsing 2023-03-02 06:56:52 +01:00
Johan Walles
b4eb15a53f Fix statusbar style printing 2023-03-02 06:50:45 +01:00
Johan Walles
c127d47b69 Handle style option better 2023-03-01 21:38:49 +01:00
Johan Walles
285aff2afc Do our own help printing 2023-03-01 07:36:49 +01:00
Johan Walles
c730afce46 Nicer code but worse feedback on option parse failures 2023-03-01 07:25:01 +01:00
Johan Walles
144ae466b3 Simplify some code 2023-01-02 23:07:04 +01:00
Johan Walles
2b77cf7605 Bump Chroma to add new styles
Relates to #112.
2022-12-29 08:28:27 +01:00
Johan Walles
b149b09905 Add --follow command line parameter
Ref: https://github.com/walles/moar/issues/108#issuecomment-1328724290
2022-11-28 19:09:17 +01:00
Johan Walles
a30a31bb2b Try supporting Clear-to-EOL
This should be about right, but the tests are still failing.
2022-10-27 16:51:17 +02:00
Johan Walles
257b9e7bf5 Clarify we want UTF-8 input
Fixes #101.
2022-08-07 19:26:51 +02:00
Johan Walles
0cd33532f9 Fix scroll hint options parsing 2022-08-07 17:57:13 +02:00
Johan Walles
1e192779f7 Add scroll hint options
Broken, unsure why. Tried it without any options and got error messages.
2022-08-07 17:43:29 +02:00
Johan Walles
2a4336f6db Add --no-statusbar to hide the status bar
Fixes #93.
2022-07-20 22:16:33 +02:00
Johan Walles
0ec6e58b23 Link to source code from --help output
Relates to #87.
2022-07-19 17:07:11 +02:00
Johan Walles
9551a536e8 Tune PAGER= hint in moar --help output 2022-04-20 07:09:42 +02:00
Johan Walles
e7b6c088a5 Suggest "moar" if we're in the $PATH, otherwise an absolute path 2022-04-18 19:05:49 +02:00
Johan Walles
7ad2bad619 Compare absolute PATH paths 2022-04-18 18:49:25 +02:00
Johan Walles
90633263c0 s/filepath.Abs/exec.LookPath/ 2022-04-18 18:41:48 +02:00
Johan Walles
faa833fe4e Use 256 colors only on xterm-256color
Fixes #86.
2022-04-01 20:24:00 +02:00
Johan Walles
388de91d3a Add option for how to render unprintable characters
Fixes #83.
2022-02-27 09:39:16 +01:00
Johan Walles
f0f4d703a0 Add --statusbar= command line option
Supports "plain", "inverse" or "bold", defaulting to "inverse".

Resolves #81.
2022-02-18 19:09:05 +01:00