From be82be31d5d750e8b7f8e39dca10f43f87221733 Mon Sep 17 00:00:00 2001 From: William Ting Date: Sun, 6 May 2012 19:51:09 -1000 Subject: [PATCH] fix env var settings --- bin/autojump | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/bin/autojump b/bin/autojump index 90ad8c2..7dcd090 100755 --- a/bin/autojump +++ b/bin/autojump @@ -22,17 +22,13 @@ else: 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') -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('~'): DB_FILE = CONFIG_DIR + '/.autojump.txt'