1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

fix env var settings

This commit is contained in:
William Ting 2012-05-06 19:51:09 -10:00
parent 9ad889a706
commit be82be31d5

View File

@ -22,17 +22,13 @@ else:
xdg_data_dir = os.environ.get('XDG_DATA_HOME') or os.path.join(os.environ['HOME'], '.local', 'share') xdg_data_dir = os.environ.get('XDG_DATA_HOME') or os.path.join(os.environ['HOME'], '.local', 'share')
CONFIG_DIR = os.path.join(xdg_data_dir, 'autojump') CONFIG_DIR = os.path.join(xdg_data_dir, 'autojump')
if 'AUTOJUMP_KEEP_ALL_ENTRIES' in os.environ:
if os.environ.get('AUTOJUMP_KEEP_ALL_ENTRIES') == 1:
KEEP_ALL_ENTRIES = True
else:
KEEP_ALL_ENTRIES = False KEEP_ALL_ENTRIES = False
if 'AUTOJUMP_KEEP_ALL_ENTRIES' in os.environ and os.environ.get('AUTOJUMP_KEEP_ALL_ENTRIES') == 1:
KEEP_ALL_ENTRIES = True
if 'AUTOJUMP_IGNORE_CASE' in os.environ:
if os.environ.get('AUTOJUMP_IGNORE_CASE') == 1:
ALWAYS_IGNORE_CASE = True
else:
ALWAYS_IGNORE_CASE = False ALWAYS_IGNORE_CASE = False
if 'AUTOJUMP_IGNORE_CASE' in os.environ and os.environ.get('AUTOJUMP_IGNORE_CASE') == 1:
ALWAYS_IGNORE_CASE = True
if CONFIG_DIR == os.path.expanduser('~'): if CONFIG_DIR == os.path.expanduser('~'):
DB_FILE = CONFIG_DIR + '/.autojump.txt' DB_FILE = CONFIG_DIR + '/.autojump.txt'