mirror of
https://github.com/chubin/cheat.sh.git
synced 2025-01-06 04:16:04 +03:00
CHTSH_CONF specifies location of cht.sh.conf (fixes #59)
This commit is contained in:
parent
150151531c
commit
c7a39d0804
@ -284,7 +284,8 @@ Type `help` for other internal `cht.sh` commands.
|
||||
cht.sh/go> /python zip list
|
||||
```
|
||||
|
||||
The `cht.sh` client has its configuration file which is located at `~/.cht.sh/cht.sh.conf`.
|
||||
The `cht.sh` client has its configuration file which is located at `~/.cht.sh/cht.sh.conf`
|
||||
(location of the file can be overriden by the environment variable `CHTSH_CONF`).
|
||||
Use it to specify query options that you would use with each query.
|
||||
For example, to switch syntax highlighting off create the file with the following
|
||||
content:
|
||||
|
@ -133,9 +133,13 @@ gen_random_str()
|
||||
fi
|
||||
)
|
||||
|
||||
if [ -e "$HOME"/.cht.sh/cht.sh.conf ]; then
|
||||
if [ -z "$CHTSH_CONF" ]; then
|
||||
CHTSH_CONF="$HOME"/.cht.sh/cht.sh.conf
|
||||
fi
|
||||
|
||||
if [ -e "$CHTSH_CONF" ]; then
|
||||
# shellcheck disable=SC1090,SC2002
|
||||
. "$HOME"/.cht.sh/cht.sh.conf
|
||||
. "$CHTSH_CONF"
|
||||
fi
|
||||
|
||||
if [ "$1" = --read ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user