mirror of
https://github.com/wting/autojump
synced 2026-03-02 03:49:26 +00:00
cleanup, add custom installation support, change default windows install directory
This commit is contained in:
@@ -75,7 +75,7 @@ def set_defaults():
|
||||
'autojump')
|
||||
elif is_windows():
|
||||
data_home = os.path.join(
|
||||
os.getenv('LOCALAPPDATA'),
|
||||
os.getenv('APPDATA'),
|
||||
'autojump')
|
||||
else:
|
||||
data_home = os.getenv(
|
||||
@@ -263,7 +263,7 @@ def match_consecutive(needles, haystack, ignore_case=False):
|
||||
(path="/moo/foo/baz", weight=10),
|
||||
(path="/foo/baz", weight=10)]
|
||||
"""
|
||||
sep = os.sep.encode('string-escape')
|
||||
sep = os.sep.replace('\\','\\\\')
|
||||
regex_no_sep = '[^' + sep + ']*'
|
||||
regex_one_sep = regex_no_sep + sep + regex_no_sep
|
||||
regex_no_sep_end = regex_no_sep + '$'
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
local HOME = clink.get_env("USERPROFILE") .."\\"
|
||||
local AUTOJUMP_BIN = HOME .. ".autojump\\bin\\autojump"
|
||||
local AUTOJUMP_BIN = (AUTOJUMP_BIN_DIR or clink.get_env("LOCALAPPDATA") .. "\\autojump\\bin") .. "\\autojump"
|
||||
|
||||
function autojump_add_to_database()
|
||||
os.execute("python " .. AUTOJUMP_BIN .. " --add " .. clink.get_cwd())
|
||||
os.execute("python " .. AUTOJUMP_BIN .. " --add " .. clink.get_cwd() .. " 2> " .. clink.get_env("TEMP") .. "\\autojump_error.txt")
|
||||
end
|
||||
|
||||
clink.prompt.register_filter(autojump_add_to_database, 99)
|
||||
|
||||
Reference in New Issue
Block a user