PR #391 changed the locaton into which system-wide cheatsheets are
installed to `/usr/share/cheat`, in order to comply with FHS. However,
this is causing conflicts with the `snap` packaging process.
This commit removes hard-coded references to `/usr/share/cheat` (outside
of `config/cheat`), and instead reads the cheat path via the
`CHEAT_PATH` config value (which may be set either in `cheat/config`, or
exported as an environment variable).
Lastly, this commit makes `setup.py` "aware of" the `CHEAT_PATH` env
var, allowing us to specify to where sytem-wide cheatsheets should be
installed during the `snap` build.
- When using GFM code fences, strip the last line in addition to the
first
- Updated `README.md` to mention the new feature
- `minor` version-bump to `2.2.0`.
pypi responded with an HTTP 500 when uploading the last version of
`cheat`, and this seems to have caused some problems. No changes were
made in this commit other than incrementing the version number in an
attempt to resolve this.
* 'setup-improvements' of https://github.com/youtux/cheat:
Use entry_points instead of scripts in setup.py
Improve setup.py description
Exploit setuptools package_data to include cheats
Use find_packages from setuptools to identify packages
Use setuptools insted of distutils.
Now, whenever a cheatsheet is to be edited, if that cheatsheet does not
exist on the `DEFAULT_SHEET_PATH`, it is first copied there before being
opened for editing. This prevents system-wide cheatsheets from being
edited when using `cheat` as `root`.
- Solves issue whereby global cheatsheets fail to save after editing
- `cheat` no longer asks a user if a global cheatsheet should be copied
locally before editing, and instead just silently does so.
This allows a fine-grained control of the dependencies, because it generates a wrapper script
that calls the specifiend function (i.e., main inside cheat/app.py)