fix completion error when path contain spaces

add comment to explain that there is no need to check previlege in windows
pull/72/head
xiaonaitong 13 years ago
parent d1a38d150e
commit e5e0001dad

@ -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…
Cancel
Save