Adds a new `-A`/`--show-all` option (in analogy to GNU Linux `cat`s option) that
highlights non-printable characters like space, tab or newline.
This works in two steps:
- **Preprocessing**: replace space by `•`, replace tab by `├──┤`, replace
newline by ``, etc.
- **Highlighting**: Use a newly written Sublime syntax to highlight
these special symbols.
Note: This feature is not technically a drop-in replacement for GNU `cat`s
`--show-all` but it has the same purpose.
Allows the `width` argument to `--terminal-width` to be an offset
instead of an absolute number. Examples:
--terminal-width=80 # Set output width to 80 characters
--terminal-width=-2 # Set output width to actual_width - 2
closes#376
This adds a `-m`/`--map-syntax` option that allows users to (re)map
certain file extensions or file names to an existing syntax.
For example:
```
bat --map-syntax .config:json
```
The option can be use multiple times. Note that you can easily make
these mappings permanent by using `bat`s new configuration file.
closes#169
This allows users to create simple configuration file
(`~/.config/bat/config` on Linux) that has the following format:
```bash
--flag1
--flag2
--option1=value1
# lines beginning with '#' are ignored
--option2=value2
# empty lines and trailing whitespace are also ignored
--option3=value3
```
Windows does not support wildcard expansion in cmd, this adds 'wild' crate (as discussed in #309) that handles everything transparently, so wildcards work everywhere.
Fixes#309
* Generate shell completions with clap during build
* Updated ci release script, added SHELL_COMPLETIONS_DIR override to build.rs and fixed dependency version
Now if a cache file exists in the current directory, and the user passes
no arguments to the cache command, the cache file would be displayed.
If however the user uses cache command with arguments, the cache command
would be executed as normal regardless of whether the file cache exists
in the current directory or not.
Though now there won't be an error message displayed if the user uses the cache sub command without arguments in any directory that contains a file named cache.