Skip to content

Commit

Permalink
Change XDG file name: s/eg.conf/egrc
Browse files Browse the repository at this point in the history
  • Loading branch information
srsudar committed May 18, 2020
1 parent 3932ee1 commit df2d8c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eg/config.py
Expand Up @@ -175,7 +175,7 @@ def get_egrc_config(cli_egrc_path):
# Try for the xdg config.
xdg_home_dir = os.getenv('XDG_CONFIG_HOME')
if xdg_home_dir:
xdg_config_path = os.path.join(xdg_home_dir, 'eg', 'eg.conf')
xdg_config_path = os.path.join(xdg_home_dir, 'eg', 'egrc')
xdg_config_path = get_expanded_path(xdg_config_path)
if os.path.isfile(xdg_config_path):
config_path = xdg_config_path
Expand Down
4 changes: 2 additions & 2 deletions test/config_test.py
Expand Up @@ -227,7 +227,7 @@ def test_get_egrc_config_uses_xdg_dir_default_if_present():
cli_path=None,
cli_config_exists=False,
winning_config_path=os.path.join('path', 'to', 'xdg_home', 'eg',
'eg.conf_expanded'),
'egrc_expanded'),
home_config_exists=True,
expected_config=expected,
xdg_dir_variable=os.path.join('path', 'to', 'xdg_home'),
Expand Down Expand Up @@ -278,7 +278,7 @@ def isfile_side_effect(file_name):
return cli_config_exists
if file_name == os.path.join('~', '.egrc_expanded'):
return home_config_exists
if file_name == os.path.join(xdg_dir_variable, 'eg', 'eg.conf_expanded'):
if file_name == os.path.join(xdg_dir_variable, 'eg', 'egrc_expanded'):
# ${XDG_DIR_HOME}/eg/egrc
return xdg_config_exists
return False
Expand Down

0 comments on commit df2d8c5

Please sign in to comment.