SC2155: Declare and assign separately to avoid masking return values.
SC2164: Use cd ... || exit in case cd fails.
SC2230: which is non-standard. Use builtin 'command -v' instead.
The macOS version of mktemp does not recognize the --suffix option.
Using pure -d should work since, it seems [1], macOS 10.11 however.
So to make the script work on macOS, stop using the --suffix option.
The downside is of course that the temporary dir will have an anonymous
name, but I see no risk of confusion given how short-lived the usage of
the dir is, and given the context it is used.
[1] https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x
Part of the work for issue #1213.
A short PowerShell script and the corresponding syntax-highlighted output
has been added. The script exhibits many of the peculiarities of the
PowerShell syntax.
This is to contribute to issue #1213. I took some of the more
complicated servers I am running as examples. Everything looks to be
correctly highlighted compared to vim's syntax highlighting.
I added a sample etc/hosts file and a sample requirements.txt file. I didn't know there was already a sample YAML file because it wasn't ticked in the issue so I added some extra syntax that I had in my own to the previous example.yaml file.
#1244 Slightly optimized create_highlighted_versions.py so that it won't walk the source path when it should be skipping the file
#1244 Updated README.md in plaintext source folder
#1244 Added extra option loading from `bat_options` file in directory and significantly reduced size of plaintext source
#1244 Updated create_highlighted_versions.py to ignore README.md files and use the --show-all option for manually-defined binary files
#1244 Updated plaintext file with command
bat -A --no-config --style=plain --color=always --theme='1337' --italic-text=always src/Plaintext/plaintext.txt > highlighted/Plaintext/plaintext.txt
#1244 Added example plaintext file