update docs

This commit is contained in:
sriniv27 2021-02-08 20:13:13 -05:00
parent ac819eb28f
commit 9b80d56773
3 changed files with 26 additions and 12 deletions

View file

@ -16,6 +16,7 @@ import keyring
import toml
import yaml
from yaml.loader import FullLoader
import jrnl.time
@ -399,9 +400,13 @@ def run(context, command, text=""):
if "cache_dir" in context and context.cache_dir is not None:
cache_dir = os.path.join("features", "cache", context.cache_dir)
command = command.format(cache_dir=cache_dir)
if "config_path" in context and context.config_path is not None:
with open(context.config_path, "r") as f:
cfg = yaml.load(f, Loader=FullLoader)
context.jrnl_config = cfg
args = split_args(command)
context.args = args[1:]
def _mock_editor(command):
context.editor_command = command
tmpfile = command[-1]