Skip to content

Commit 5a841a5

Browse files
committed
Revert "cli: Expand env vars of $XDG_CONFIG_HOME"
This reverts commit 87bbe0a. No need to expand env, see: SilverRainZ/dotfiles@07be406
1 parent 87bbe0a commit 5a841a5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sphinxnotes/snippet/cli.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
from .cache import Cache
2323
from .table import tablify, COLUMNS
2424

25-
# Neovim's $XDG_CONFIG_HOME is "$HOME/.config", expand for it.
26-
DEFAULT_CONFIG_FILE = path.join(path.expandvars(xdg_config_home), *__title__.split('-'), 'conf.py')
25+
DEFAULT_CONFIG_FILE = path.join(xdg_config_home, *__title__.split('-'), 'conf.py')
2726

2827
class HelpFormatter(argparse.ArgumentDefaultsHelpFormatter,
2928
argparse.RawDescriptionHelpFormatter): pass
@@ -103,7 +102,7 @@ def main(argv:List[str]=sys.argv[1:]) -> int:
103102

104103
# Load config from file
105104
if args.config == DEFAULT_CONFIG_FILE and not path.isfile(DEFAULT_CONFIG_FILE):
106-
print(f'the default configuration file {DEFAULT_CONFIG_FILE} does not exist, ignore it', file=sys.stderr)
105+
print('the default configuration file does not exist, ignore it', file=sys.stderr)
107106
cfg = Config({})
108107
else:
109108
cfg = Config.load(args.config)
@@ -120,7 +119,6 @@ def main(argv:List[str]=sys.argv[1:]) -> int:
120119
else:
121120
parser.print_help()
122121

123-
return 0
124122

125123
def _on_command_stat(args:argparse.Namespace):
126124
cache = args.cache

0 commit comments

Comments
 (0)