mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
fix completion error when path contain spaces
add comment to explain that there is no need to check previlege in windows
This commit is contained in:
parent
d1a38d150e
commit
e5e0001dad
2
autojump
2
autojump
@ -76,7 +76,7 @@ def unico(text):
|
||||
def save(path_dict, dic_file):
|
||||
"""Save the database in an atomic way, and preserve
|
||||
a backup file."""
|
||||
# If the dic_file exists, check that it belongs to us
|
||||
# If the dic_file exists and os is not windows, check that it belongs to us
|
||||
# Otherwise, fail quietly
|
||||
if (not os.path.exists(dic_file)) or os.name == 'nt' or os.getuid() == os.stat(dic_file)[4]:
|
||||
temp = NamedTemporaryFile(dir=CONFIG_DIR, delete=False)
|
||||
|
@ -20,10 +20,12 @@ _autojump()
|
||||
local cur
|
||||
cur=${COMP_WORDS[*]:1}
|
||||
comps=$(autojump --bash --completion $cur)
|
||||
for i in $comps
|
||||
while read i
|
||||
do
|
||||
COMPREPLY=("${COMPREPLY[@]}" "${i}")
|
||||
done
|
||||
done <<EOF
|
||||
$comps
|
||||
EOF
|
||||
}
|
||||
complete -F _autojump j
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user