Commit Graph

39 Commits

Author SHA1 Message Date
sharkdp ea955c734d Refactoring, introduce Printer trait 2018-08-23 19:44:14 +02:00
sharkdp 6223ad6d52 Document Config struct 2018-08-22 22:36:59 +02:00
sharkdp 31a9335bd5 Document Config struct 2018-08-22 22:36:37 +02:00
sharkdp 9316f2a758 Major refactoring and cleanup 2018-08-22 22:29:12 +02:00
sharkdp c884c3cc12 Re-order options in help texts 2018-08-22 19:34:30 +02:00
sharkdp 08850f0474 Update the `--help` text 2018-08-22 19:27:11 +02:00
Tim Sampson 8e6c5bc562 doc: mention BAT_THEME in help output 2018-08-22 18:14:01 +02:00
sharkdp 052425b12f Load customized themes in addition to defaults
- New themes in `$BAT_CONFIG_DIR/themes` are now loaded *in addition* to
  the default themes (they may also override).
- The `Default.tmTheme` symlink is not necessary anymore.

This relates to #172
2018-08-20 21:39:21 +02:00
sharkdp 2df3305b94 Add new '--blank' option for 'bat cache --init'
closes #206
2018-08-20 21:34:08 +02:00
sharkdp 6882fc1512 Clean up help messages 2018-08-20 21:34:08 +02:00
sharkdp 268577c6f9 Run 'cargo fmt' 2018-08-18 17:54:26 +02:00
sharkdp 28397b8f78 Always show a warning when theme is unknown 2018-07-23 21:51:49 +02:00
sharkdp c899849101 Use map instead of and_then(..Some(..)) 2018-07-23 21:51:49 +02:00
sharkdp bf53b64125 Small style fix 2018-07-23 21:51:49 +02:00
Armando Perez c68aa0f424 Allow specifying the theme via the `BAT_THEME` environment variable
The `--theme` command line option stills takes precedence and this
change preserves how errors are handled when it's used: If a theme name
that doesn't exist is specified using the argument, this error is fatal.
However, if a theme that doesn't exist is specified using the environment
variable, the error is logged to `stderr` and the "Default" theme is
loaded as a fallback.
2018-07-23 21:51:49 +02:00
Stéphane Campinas 8c6a74a6c5 typo 2018-07-06 19:09:53 +02:00
sharkdp 65e6970907 Change help text for --line-range 2018-06-12 08:18:44 +02:00
sharkdp 90cc019482 Run 'cargo fmt' 2018-06-12 08:18:44 +02:00
Taylor eaf0b99d25 update 2018-06-12 08:18:44 +02:00
Taylor Skinner 3b1dcca5d0 use map() 2018-06-12 08:18:44 +02:00
Taylor Skinner 26dbdf4fa0 update line-ranges 2018-06-12 08:18:44 +02:00
Taylor Skinner 6691786d82 add line-range 2018-06-12 08:18:44 +02:00
sharkdp 9342d0bb24 Explicitly specify which args override themselves 2018-05-24 22:53:23 +02:00
sharkdp 36d7250af2 Allow arguments to override themselves 2018-05-24 22:53:23 +02:00
sharkdp be0a2d6048 Extended help texts for '--help' 2018-05-19 17:54:05 +02:00
sharkdp d1a1943998 Add -u and -n options, see #134 2018-05-19 16:58:45 +02:00
sharkdp 96cc391f2d Skip '--quit-if-one-screen' for --paging=always
closes #97
2018-05-19 10:54:54 +02:00
sharkdp 145b99f01c Include syntaxes and themes in repository
This changes a few things:

- All syntaxes and themes are now stored (as submodules) under
  assets/syntaxes and assets/themes

- The default directories for syntaxes and themes are "syntaxes"
  and "themes" (used to be "syntax" and "themes")

- The "bat cache" command can now take a `--source <dir>` and
  `--target <dir>` option.

- The cached files have been renamed to "themes.bin" and "syntaxes.bin"
2018-05-16 22:04:12 +02:00
David Peter 2eee68599d
Merge pull request #102 from eth-p/master
Added text wrapping. (Fixes #54)
2018-05-16 08:41:49 +02:00
eth-p d569693dab Formatted with newer cargo fmt.
It should pass all the checks now.
2018-05-16 08:29:41 +02:00
sharkdp fcecd97224 Add ansi_term import for Windows, see #107 2018-05-13 21:19:26 +02:00
eth-p 870b3c0daf
PR #102 Followed @BrainMaestro's suggestions
Also ran cargo fmt.
2018-05-13 03:26:23 -07:00
sharkdp ca865f9d26 Enable ANSI support on Windows 10 2018-05-13 09:58:16 +02:00
eth-p d4b438b9d3
Fix padding, add --wrap argument, disable wrap for non-tty. (Fixed)
I'm not quite sure what was up with git on that last commit, but it's
all properly committed now.
2018-05-12 13:44:10 -07:00
eth-p fc160b0dcd
PR #102 Review Changes
- Reformatted code.
- Removed leftover code.
- Removed leftover comments.
- Fixed compiling on Rust 1.24.0
2018-05-12 06:32:23 -07:00
eth-p 4e4110bf50
Added line wrapping. 2018-05-11 21:59:26 -07:00
Ryan Leung 22c8978fca add theme option (#95)
closes #89
2018-05-11 13:53:17 +02:00
Ezinwa Okpoechi f711fb5006 Split style to separate module 2018-05-11 10:15:26 +02:00
Ezinwa Okpoechi 64a9341b73 Split app to separate module 2018-05-11 10:15:26 +02:00