From 62dfc4c226f3cef8907bb00ea8f42241cd795456 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 11 Mar 2014 18:04:04 +0100 Subject: check passwd for user home if necessary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/__main__.py') diff --git a/src/__main__.py b/src/__main__.py index f66f974..e894221 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -403,7 +403,7 @@ if (config_file is None) and any([doreset, location] + settings): else: ## Load extension and configurations via blueshiftrc if config_file is None: - for file in ('$XDG_CONFIG_HOME/%/%rc', '$HOME/.config/%/%rc', '$HOME/.%rc', '/etc/%rc'): + for file in ('$XDG_CONFIG_HOME/%/%rc', '$HOME/.config/%/%rc', '$HOME/.%rc', '$~/.config/%/%rc', '$~/.%c', '/etc/%rc'): file = file.replace('%', 'blueshift') for arg in ('XDG_CONFIG_HOME', 'HOME'): if '$' + arg in file: @@ -412,6 +412,9 @@ else: else: file = None break + if file.startswith('$~'): + import pwd + file = pwd.getpwuid(os.getuid()).pw_dir + file[2:] if file is not None: file = file.replace('\0', '$') if os.path.exists(file): -- cgit v1.2.3-70-g09d2