mirror of https://github.com/cheat/cheat.git
Merge branch 'DEFAULT_CHEAT_DIR' of https://github.com/a-sk/cheat into a-sk-DEFAULT_CHEAT_DIR
* 'DEFAULT_CHEAT_DIR' of https://github.com/a-sk/cheat: Add note about DEFAULT_CHEAT_DIR to the README file Remove odd new line Introduce DEFAULT_CHEAT_DIR environment variable
This commit is contained in:
commit
e71a3d627d
|
@ -88,6 +88,14 @@ Advanced Features
|
|||
|
||||
Setting a CHEATPATH
|
||||
----------------------
|
||||
|
||||
By default cheatsheets are stored in the `~/.cheat/` directory, you can
|
||||
override it by setting `DEFAULT_CHEAT_DIR` environment variable.
|
||||
|
||||
```bash
|
||||
export DEFAULT_CHEAT_DIR=/path/to/my/cheats
|
||||
```
|
||||
|
||||
By default, all cheatsheets are installed to `~/.cheat/`, but you can instruct
|
||||
`cheat` to look for cheatsheets in other directories by exporting a `CHEATPATH`
|
||||
environment variable:
|
||||
|
|
3
cheat
3
cheat
|
@ -3,7 +3,8 @@ import os
|
|||
import sys
|
||||
import subprocess
|
||||
|
||||
DEFAULT_CHEAT_DIR = os.path.join(os.path.expanduser('~'), '.cheat')
|
||||
DEFAULT_CHEAT_DIR = os.environ.get('DEFAULT_CHEAT_DIR') or \
|
||||
os.path.join(os.path.expanduser('~'), '.cheat')
|
||||
USE_PYGMENTS = False
|
||||
|
||||
# NOTE remove this check if it is confirmed to work on windows
|
||||
|
|
Loading…
Reference in New Issue